<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIGestureRecognizerDelegate/gestureRecognizer(_:shouldReceive:)-73vzu",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(pl)UIGestureRecognizerDelegate(im)gestureRecognizer:shouldReceivePress:"
  },
  "title" : "gestureRecognizer(_:shouldReceive:)"
}
-->

# gestureRecognizer(_:shouldReceive:)

Asks the delegate if a gesture recognizer should receive an object representing a press.

```
optional func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldReceive press: UIPress) -> Bool
```

## Parameters

`gestureRecognizer`

An instance of a subclass of the abstract base class [`UIGestureRecognizer`](/documentation/UIKit/UIGestureRecognizer).

`press`

A [`UIPress`](/documentation/UIKit/UIPress) object from the current press sequence.

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> (the default) to allow the gesture recognizer to examine the press object, or <doc://com.apple.documentation/documentation/Swift/false> to prevent the gesture recognizer from seeing this press object.

## Discussion

UIKit calls this method before the [`pressesBegan(_:with:)`](/documentation/UIKit/UIGestureRecognizer/pressesBegan(_:with:)) method of the gesture recognizer.

---

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)