From tapping buttons to moving a slider, many built-in interface elements implement their own gestures. But sometimes you need to do something different: swipe through cars, give a quick gesture to reset state, or move a view to a new destination. All these gestures are easy to implement using
UIGestureRecognizer and related classes.
UIGestureRecognizer is an abstract superclass and encapsulates the properties and behaviors that are common to any recognizer: what view the recognizer is attached to, whether it is enabled, where the touch is happening, how many fingers are on the screen, and so on. Built-in recognizers as well as your own custom ones are all based on the abstract one.
Recognizers have a few common attributes. ...