<!--
{
  "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/UIGestureRecognizer/pressesBegan(_:with:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIGestureRecognizer(im)pressesBegan:withEvent:"
  },
  "title" : "pressesBegan(_:with:)"
}
-->

# pressesBegan(_:with:)

Sent to the receiver when a physical button is pressed in the associated view.

```
func pressesBegan(_ presses: Set<UIPress>, with event: UIPressesEvent)
```

## Parameters

`presses`

A set of [`UIPress`](/documentation/UIKit/UIPress) instances in the event represented by `event` that represent the touches in the [`UIPress.Phase.began`](/documentation/UIKit/UIPress/Phase-swift.enum/began) phase.

`event`

A [`UIEvent`](/documentation/UIKit/UIEvent) object that includes a reference to `press`.

## Discussion

This method has the same signature as the corresponding one declared by [`UIResponder`](/documentation/UIKit/UIResponder). With this method, a gesture recognizer receives press objects (in their [`UIPress.Phase.began`](/documentation/UIKit/UIPress/Phase-swift.enum/began) phase) before the view attached to the gesture recognizer receives them. `UIGestureRecognizer` objects are not in the responder chain, yet they observe presses hit-tested to their view and their view’s subviews.

If the gesture recognizer is interpreting a continuous gesture, it should set its state to [`UIGestureRecognizer.State.began`](/documentation/UIKit/UIGestureRecognizer/State-swift.enum/began) upon receiving this message. If at any point in its handling of the press objects the gesture recognizer determines that the press event sequence is not its gesture, it should set its state to [`UIGestureRecognizer.State.cancelled`](/documentation/UIKit/UIGestureRecognizer/State-swift.enum/cancelled).

---

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)