pressesBegan(_:with:)
Tells this object when a physical button is first pressed.
Declaration
func pressesBegan(_ presses: Set<UIPress>, with event: UIPressesEvent?)Parameters
Mentioned in
Discussion
UIKit calls this method when a new button is pressed by the user. Use this method to determine which button was pressed and to take any needed actions.
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.