---
title: "makeUIGestureRecognizer(context:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/uigesturerecognizerrepresentable/makeuigesturerecognizer(context:)"
---

# makeUIGestureRecognizer(context:)

Creates an instance of the represented gesture recognizer.

## Declaration

```swift
@MainActor @preconcurrency func makeUIGestureRecognizer(context: Self.Context) -> Self.UIGestureRecognizerType
```

## Parameters

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

## Discussion

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.
