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

# gestureRecognizerShouldBegin(_:)

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

```
@MainActor optional func gestureRecognizerShouldBegin(_ gestureRecognizer: NSGestureRecognizer) -> Bool
```

## Parameters

`gestureRecognizer`

The gesture recognizer object that is interpreting events. This is the object with which the delegate is associated.

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> to let the gesture recognizer transition out of the Possible ([`NSGestureRecognizer.State.possible`](/documentation/AppKit/NSGestureRecognizer/State-swift.enum/possible)) and continue trying to recognize the gesture or <doc://com.apple.documentation/documentation/Swift/false> to prevent it from trying to recognize its gesture. If you do not implement this method, the default return value is <doc://com.apple.documentation/documentation/Swift/true>.

## Discussion

When a gesture recognizer attempts to transition from the Possible ([`NSGestureRecognizer.State.possible`](/documentation/AppKit/NSGestureRecognizer/State-swift.enum/possible)) state to a different state, such as [`NSGestureRecognizer.State.began`](/documentation/AppKit/NSGestureRecognizer/State-swift.enum/began), the gesture recognizer calls this method to see if the transition should occur. Returning <doc://com.apple.documentation/documentation/Swift/false> from this delegate method causes the gesture recognizer to transition to the [`NSGestureRecognizer.State.failed`](/documentation/AppKit/NSGestureRecognizer/State-swift.enum/failed) state.

For information about gesture states and transitions, see [`State Transitions`](/documentation/AppKit/NSGestureRecognizer#State-Transitions) in [`NSGestureRecognizer`](/documentation/AppKit/NSGestureRecognizer).

---

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)