Class

UIPress

An object that represents the presence or movement of a button press on the screen for a particular event.

Declaration

@interface UIPress : NSObject

Overview

The press specifically encapsulates the pressing of some physically actuated button. All of the press types represent actual physical buttons on one of a variety of remotes. You access UIPress objects through UIEvent objects passed into responder objects for event handling. The gestureRecognizers property returns the gesture recognizers—that is, instances of a concrete subclass of UIGestureRecognizer—that are currently handling the given button press.

Topics

Getting a Press Object’s Gesture Recognizers

force

The force of the button press.

gestureRecognizers

The gesture recognizers that are receiving the press.

Responding to Press Events

Getting the Press’s Location

window

The window in which the press initially occurred.

Getting Press Attributes

type

The type of the specified press.

phase

The current press phase of the object.

timestamp

The time when the press occurred or when it was last mutated.

Constants

UIPressPhase

The phases of a button press.

UIPressType

The types of button presses.

Relationships

Inherits From

See Also

Button Presses

UIPressesEvent

An event that describes the state of a set of physical buttons that are available to the device, such as those on an associated remote or game controller.