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

# beginGesture(with:)

Informs the receiver that the user has begun a touch gesture.

```
func beginGesture(with event: NSEvent)
```

## Parameters

`event`

An event object representing the gesture beginning.

## Discussion

The event will be sent to the view under the touch in the key window.

Note that this method is no longer called on apps that link against macOS 10.11 and later. If you need to access the phases of a specific gesture, you can implement the responder for that gesture and examine its [`phase`](/documentation/AppKit/NSEvent/phase-swift.property) property instead.

---

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)