---
title: "handleUIGestureRecognizerAction(_:context:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/uigesturerecognizerrepresentable/handleuigesturerecognizeraction(_:context:)"
---

# handleUIGestureRecognizerAction(_:context:)

Handles recognition of the represented UIGestureRecognizer.

## Declaration

```swift
@MainActor @preconcurrency func handleUIGestureRecognizerAction(_ recognizer: Self.UIGestureRecognizerType, context: Self.Context)
```

## Parameters

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

## Discussion

Discussion If you implement this method, SwiftUI calls it when the wrapped gesture recognizer is recognized.
