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
SBGestureRecognizer - iPhone Development Wiki


From iPhone Development Wiki
Revision as of 03:49, 6 August 2014 by IKy1e (talk | contribs) (Added notes about how SpringBoard creates and stores SBGestureRecognizers)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

SBGestureRecognizer is a skeleton class used by SpringBoard to recognize system-wide gestures. These gestures include multitasking gestures (iPad only) and the gesture to open Notification Center. SBGestureRecognizer in similar in many respects to UIGestureRecognizer, however, it is not a part of UIKit. Touch input is processed by backboardd, which must decide whether or not to forward the touch input to the current app, or to forward them to SpringBoard for processing by SBGestureRecognizer.[1]

SBGestureRecognizer does not contain any initializers, and must be subclassed. As of iOS 6, there are only four subclasses of SBGestureRecognizer by default. These include:

  • SBFluidSlideGestureRecognizer -> SBPanGestureRecognizer
  • SBOffscreenSwipeGestureRecognizer
  • SBScaleGestureRecognizer


There are various types of SBGestureRecognizer. It can be retrieved from -[SBGestureRecognizer types] and used to filter your desired gesture recognizer when intercepting its touch events without knowing which class initializes it. Here is a list of all possible types on iOS 7.

Bit mask Type Description
1 << 0 Suspend App
1 << 1 Switcher
1 << 2 Switch App
1 << 3 Show Notifications
1 << 4 Hide Notifications
1 << 5 Dismiss Banner
1 << 6 Show Control Center