This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// BasicLayoutAnchorsHolding.swift | |
// Watch The Throne | |
// | |
// Created by Serena on 07/01/2023 | |
// | |
import UIKit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
} |