Bearbeiten

Freigeben über


UIPressPhase Enum

Definition

Enumerates the phases of the button-press life-cycle.

[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 9, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.WatchOS, ObjCRuntime.PlatformArchitecture.All, null)]
public enum UIPressPhase
type UIPressPhase = 
Inheritance
UIPressPhase
Attributes

Fields

Name Value Description
Began 0

The initial state of a button. Indicates that a press has begun.

Changed 1

Indicates that either the location of the button press or it's Force has changed.

Stationary 2

Indicates that the button is still down, with the same location and force as previously.

Ended 3

Indicates that the button has been released.

Cancelled 4

Indicates that the system has canceled tracking of this button-press sequence.

Remarks

UIPress objects model not just digital presses but, for instance, trackpads, so a UIPress may have both location and force data. Additionally, the system may cancel tracking of a button press at any time. This leads to the following state-machine:

Applies to