<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSGestureRecognizerDelegate",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(pl)NSGestureRecognizerDelegate"
  },
  "title" : "NSGestureRecognizerDelegate"
}
-->

# NSGestureRecognizerDelegate

A set of methods for fine-tuning a gesture recognizer’s behavior.

```
protocol NSGestureRecognizerDelegate : NSObjectProtocol
```

## Overview

Use the methods in this protocol to establish dynamic dependencies between gesture recognizers and to prevent a single gesture recognizer from acting at all.

## Topics

### Regulating gesture recognition

[`-  gestureRecognizer:shouldAttemptToRecognizeWithEvent:`](/documentation/AppKit/NSGestureRecognizerDelegate/gestureRecognizer(_:shouldAttemptToRecognizeWith:))

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

[`-  gestureRecognizerShouldBegin:`](/documentation/AppKit/NSGestureRecognizerDelegate/gestureRecognizerShouldBegin(_:))

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

### Controlling simultaneous gesture recognition

[`-  gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:`](/documentation/AppKit/NSGestureRecognizerDelegate/gestureRecognizer(_:shouldRecognizeSimultaneouslyWith:))

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

### Setting up failure requirements

[`-  gestureRecognizer:shouldRequireFailureOfGestureRecognizer:`](/documentation/AppKit/NSGestureRecognizerDelegate/gestureRecognizer(_:shouldRequireFailureOf:))

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

[`-  gestureRecognizer:shouldBeRequiredToFailByGestureRecognizer:`](/documentation/AppKit/NSGestureRecognizerDelegate/gestureRecognizer(_:shouldBeRequiredToFailBy:))

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

### Controlling touch reception

[`-  gestureRecognizer:shouldReceiveTouch:`](/documentation/AppKit/NSGestureRecognizerDelegate/gestureRecognizer(_:shouldReceive:))

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

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)