---
title: "pressesEnded(_:with:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uiresponder/pressesended(_:with:)"
---

# pressesEnded(_:with:)

Tells the object when a button is released.

## Declaration

```swift
func pressesEnded(_ presses: Set<UIPress>, with event: UIPressesEvent?)
```

## Parameters

- `presses`: A set of doc://com.apple.uikit/documentation/UIKit/UIPress instances that represent the buttons that the user is no longer pressing. The phase of each press is set to doc://com.apple.uikit/documentation/UIKit/UIPress/Phase-swift.enum/ended.
- `event`: The event to which the presses belong.

## Mentioned in

Handling key presses made on a physical keyboard

## Discussion

Discussion UIKit calls this method when the user stops pressing one or more buttons. Use this method to take any needed actions in response to the end of the press.The default implementation of this method forwards the message up the responder chain. When creating your own subclasses, call super to forward any events that you don’t handle yourself.

## See Also

### Responding to press events

- [pressesBegan(_:with:)](uikit/uiresponder/pressesbegan(_:with:).md)
- [pressesChanged(_:with:)](uikit/uiresponder/presseschanged(_:with:).md)
- [pressesCancelled(_:with:)](uikit/uiresponder/pressescancelled(_:with:).md)
