---
title: UIGestureRecognizerDelegate
framework: uikit
role: symbol
role_heading: Protocol
path: uikit/uigesturerecognizerdelegate
---

# UIGestureRecognizerDelegate

A set of methods implemented by the delegate of a gesture recognizer to fine-tune an app’s gesture-recognition behavior.

## Declaration

```swift
@MainActor protocol UIGestureRecognizerDelegate : NSObjectProtocol
```

## Mentioned in

Preferring one gesture over another

## Overview

Overview The delegates receive messages from a gesture recognizer, and their responses to these messages enable them to affect the operation of the gesture recognizer or to specify a relationship between it and another gesture recognizer, such as allowing simultaneous recognition or setting up a dynamic failure requirement. An example of a situation where dynamic failure requirements are useful is in an app that attaches a screen-edge pan gesture recognizer to a view. In this case, you might want all other relevant gesture recognizers associated with that view’s subtree to require the screen-edge gesture recognizer to fail so you can prevent any graphical glitches that might occur when the other recognizers get canceled after starting the recognition process. To do this, you could use code similar to the following:

## Topics

### Regulating gesture recognition

- [gestureRecognizerShouldBegin(_:)](uikit/uigesturerecognizerdelegate/gesturerecognizershouldbegin(_:).md)
- [gestureRecognizer(_:shouldReceive:)](uikit/uigesturerecognizerdelegate/gesturerecognizer(_:shouldreceive:)-16fuh.md)
- [gestureRecognizer(_:shouldReceive:)](uikit/uigesturerecognizerdelegate/gesturerecognizer(_:shouldreceive:)-73vzu.md)
- [gestureRecognizer(_:shouldReceive:)](uikit/uigesturerecognizerdelegate/gesturerecognizer(_:shouldreceive:)-evxd.md)

### Controlling simultaneous gesture recognition

- [gestureRecognizer(_:shouldRecognizeSimultaneouslyWith:)](uikit/uigesturerecognizerdelegate/gesturerecognizer(_:shouldrecognizesimultaneouslywith:).md)

### Setting up failure requirements

- [gestureRecognizer(_:shouldRequireFailureOf:)](uikit/uigesturerecognizerdelegate/gesturerecognizer(_:shouldrequirefailureof:).md)
- [gestureRecognizer(_:shouldBeRequiredToFailBy:)](uikit/uigesturerecognizerdelegate/gesturerecognizer(_:shouldberequiredtofailby:).md)

## Relationships

### Inherits From

- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

### Conforming Types

- [UITableViewCell](uikit/uitableviewcell.md)

## See Also

### Custom gestures

- [Implementing a custom gesture recognizer](uikit/implementing-a-custom-gesture-recognizer.md)
- [UIGestureRecognizer](uikit/uigesturerecognizer.md)
- [Supporting gesture interaction in your apps](uikit/supporting-gesture-interaction-in-your-apps.md)
