Skip to content

Instantly share code, notes, and snippets.

extension UIView {
    // hides view/layer when:
    // 1) a screenshot is taken
    // 2) a screen recording is happening
    // the screen recording can either be on-device, like from the Control Center
    // or can be from another source, like recording the screen from a mac on QuickTime
    func hideViewFromCapture(hide: Bool) -> Bool {
        let propertyBase64 = "ZGlzYWJsZVVwZGF0ZU1hc2s=" /* "disableUpdateMask" encoded in base64 */
@NSAntoine
NSAntoine / anime-madoka.gif
Last active February 10, 2023 20:56
MadokaHomura
anime-madoka.gif
//
// BasicLayoutAnchorsHolding.swift
// Watch The Throne
//
// Created by Serena on 07/01/2023
//
import UIKit
import Foundation
/// Returns a ioctl number from a specified group and number
func getIoctlNumber(group: Character, number n:UInt) -> UInt {
let void = UInt(IOC_VOID)
let g: UInt = UInt(group.asciiValue!) << 8
return void | g | n
}