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: Difference between revisions - iPhone Development Wiki

SBGestureRecognizer: Difference between revisions

From iPhone Development Wiki
(Added SBGestureRecognizer types)
m (Added notes about how SpringBoard creates and stores SBGestureRecognizers)
 
Line 41: Line 41:
== References ==
== References ==
<references/>
<references/>
Notes: https://gist.github.com/freerunnering/9aeb36ea211f65c823d7


{{occlass|library=SpringBoard.app|navbox=1}}
{{occlass|library=SpringBoard.app|navbox=1}}

Latest revision as of 03:49, 6 August 2014

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

Types

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

References

Notes: https://gist.github.com/freerunnering/9aeb36ea211f65c823d7