Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/extensions/Variables/includes/ExtVariables.php on line 198
_UISystemGestureManager - iPhone Development Wiki

_UISystemGestureManager

From iPhone Development Wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

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://headers.cynder.me/index.php?sdk=ios/15.4&fw=PrivateFrameworks/UIKitCore.framework&file=Headers/_UISystemGestureManager.h

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];