Protocol

NSGestureRecognizerDelegate

The NSGestureRecognizerDelegate protocol implements methods for fine-tuning a gesture recognizer’s behavior. Use these methods to establish dynamic dependencies between gesture recognizers and to prevent a single gesture recognizer from acting at all.

Symbols

Regulating Gesture Recognition

func gestureRecognizer(NSGestureRecognizer, shouldAttemptToRecognizeWith: NSEvent)

Asks the delegate if a gesture recognizer should attempt to recognize gestures for a particular event.

func gestureRecognizerShouldBegin(NSGestureRecognizer)

Asks the delegate if a gesture recognizer should transition out of the Possible (NSGestureRecognizerStatePossible) state.

Controlling Simultaneous Gesture Recognition

func gestureRecognizer(NSGestureRecognizer, shouldRecognizeSimultaneouslyWith: NSGestureRecognizer)

Asks the delegate if two gesture recognizers should be allowed to recognize their gestures simultaneously.

Setting Up Failure Requirements

func gestureRecognizer(NSGestureRecognizer, shouldRequireFailureOf: NSGestureRecognizer)

Asks the delegate if the current gesture recognizer must wait to recognize its gesture until the specified gesture recognizer fails.

func gestureRecognizer(NSGestureRecognizer, shouldBeRequiredToFailBy: NSGestureRecognizer)

Asks the delegate if the current gesture recognizer must fail before another gesture recognizer is allowed to recognize its gesture.

Instance Methods

func gestureRecognizer(NSGestureRecognizer, shouldReceive: NSTouch)

Called, for a new touch, before the system calls the touchesBegan:withEvent: method on the gesture recognizer. Return NO to prevent the gesture recognizer from seeing this touch.

Relationships

Inherits From