(Created page with " The _UISystemGestureManager, introduced in iOS 13, handles gestures across the system. It can be used to add and remove custom gestures from SpringBoard. Header: https://he...") |
(No difference)
|
Latest revision as of 06:48, 30 June 2022
The _UISystemGestureManager, introduced in iOS 13, handles gestures across the system. It can be used to add and remove custom gestures from SpringBoard.
Adding a Gesture Recognizer across all of SpringBoard
self.pinchGestureRecognizer = [[UIPinchGestureRecognizer alloc] initWithTarget:self action:@selector(handlePinchGesture:)];
FBSDisplayIdentity *displayIdentity = [[[UIScreen mainScreen] displayConfiguration] identity];
[[_UISystemGestureManager sharedInstance] addGestureRecognizer:self.pinchGestureRecognizer toDisplayWithIdentity:displayIdentity];
Removing a Gesture Recognizer from the system
FBSDisplayIdentity *displayIdentity = [[[UIScreen mainScreen] displayConfiguration] identity];
[[_UISystemGestureManager sharedInstance] removeGestureRecognizer:self.pinchGestureRecognizer toDisplayWithIdentity:displayIdentity];