Created
December 20, 2024 19:27
-
-
Save harlanhaskins/832ba1253b1df0a61158be5988b31278 to your computer and use it in GitHub Desktop.
UIKit user defaults for gesture logging
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
@MainActor | |
enum UIKitDefaults { | |
static let defaults = UserDefaults(suiteName: "com.apple.UIKit")! | |
// Enables UIKit gesture logging, which will log the set of gesture recognizers responding to a touch and their states. | |
static var gestureLoggingEnabled: Bool { | |
get { defaults.bool(forKey: "LogGesture") } | |
set { defaults.set(newValue, forKey: "LogGesture") } | |
} | |
// Enables gesture environment logging, which will log the set of gestures and their failure relationships in the gesture graph. | |
static var gestureEnvironmentLoggingEnabled: Bool { | |
get { defaults.bool(forKey: "LogGestureEnvironment") } | |
set { defaults.set(newValue, forKey: "LogGestureEnvironment") } | |
} | |
// Enables touch logging, which will log all touches sent to the app and the view that receives them. | |
static var touchLoggingEnabled: Bool { | |
get { defaults.bool(forKey: "LogTouch") } | |
set { defaults.set(newValue, forKey: "LogTouch") } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment