<!--
{
  "availability" : [
    "macOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/NSGestureRecognizerRepresentable/makeNSGestureRecognizer(context:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI32NSGestureRecognizerRepresentableP04makecD07context0cD4TypeQzAA0cdE7ContextVyxG_tF"
  },
  "title" : "makeNSGestureRecognizer(context:)"
}
-->

# makeNSGestureRecognizer(context:)

Creates an instance of the represented gesture recognizer.

```
@MainActor @preconcurrency func makeNSGestureRecognizer(context: Self.Context) -> Self.NSGestureRecognizerType
```

## Parameters

`context`

A context structure containing information about
the current state of the system, such as the current coordinator
instance.

## Discussion> Note: Gesture recognizers are created on-demand and torn down when an
> event sequence ends, so do not perform expensive work in this method.

---

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)