Instance Method


Tells the object when a button is released.


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



A set of UIPress instances that represent the buttons that the user is no longer pressing. The phase of each press is set to UIPress.Phase.ended.


The event to which the presses belong.


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 do not handle yourself.

See Also

Responding to Press Events

func pressesBegan(Set<UIPress>, with: UIPressesEvent?)

Tells this object when a physical button is first pressed.

func pressesChanged(Set<UIPress>, with: UIPressesEvent?)

Tells this object when a value associated with a press has changed.

func pressesCancelled(Set<UIPress>, with: UIPressesEvent?)

Tells this object when a system event (such as a low-memory warning) cancels a press event.