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

# reset()

Overridden to reset the internal state of the gesture recognizer when an attempt completes.

```
func reset()
```

## Discussion

AppKit calls this method after the gesture recognizer state has been set to any of the terminal states: [`NSGestureRecognizer.State.ended`](/documentation/AppKit/NSGestureRecognizer/State-swift.enum/ended), [`NSGestureRecognizer.State.cancelled`](/documentation/AppKit/NSGestureRecognizer/State-swift.enum/cancelled), [`NSGestureRecognizer.State.failed`](/documentation/AppKit/NSGestureRecognizer/State-swift.enum/failed), or [`recognized`](/documentation/AppKit/NSGestureRecognizer/State-swift.enum/recognized). Subclasses should override this method and use it to reset any internal state of the gesture recognizer in preparation for a new recognition attempt. After this method is called, the gesture recognizer receives no further updates for events that began but have not yet ended.

---

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)