Instance Method

addGestureRecognizer:

Attaches a gesture recognizer to the view.

Declaration

- (void)addGestureRecognizer:(UIGestureRecognizer *)gestureRecognizer;

Parameters

gestureRecognizer

An object whose class descends from the UIGestureRecognizer class. This parameter must not be nil.

Discussion

Attaching a gesture recognizer to a view defines the scope of the represented gesture, causing it to receive touches hit-tested to that view and all of its subviews. The view establishes a strong reference to the gesture recognizer.

See Also

Managing Gesture Recognizers

- removeGestureRecognizer:

Detaches a gesture recognizer from the receiving view.

gestureRecognizers

The gesture-recognizer objects currently attached to the view.

- gestureRecognizerShouldBegin:

Asks the view if the gesture recognizer should be allowed to continue tracking touch events.