iOS Guides | Samples

MonoTouch.UIKit.UIPressPhase Enumeration

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

Syntax

[MonoTouch.ObjCRuntime.Introduced(MonoTouch.ObjCRuntime.PlatformName.iOS, 9, 0, MonoTouch.ObjCRuntime.PlatformArchitecture.None, null)]
[MonoTouch.ObjCRuntime.Native]
[MonoTouch.ObjCRuntime.Unavailable(MonoTouch.ObjCRuntime.PlatformName.WatchOS, MonoTouch.ObjCRuntime.PlatformArchitecture.All, null)]
public enum UIPressPhase

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:

Members

Member NameDescription
BeganThe initial state of a button. Indicates that a press has begun.
CancelledIndicates that the system has canceled tracking of this button-press sequence.
ChangedIndicates that either the location of the button press or it's UIPress.Force has changed.
EndedIndicates that the button has been released.
StationaryIndicates that the button is still down, with the same location and force as previously.

Requirements

Namespace: MonoTouch.UIKit
Assembly: monotouch (in monotouch.dll)
Assembly Versions: 0.0.0.0

The members of MonoTouch.UIKit.UIPressPhase are listed below.

See Also: Enum

Public Fields

BeganUIPressPhase. The initial state of a button. Indicates that a press has begun.
CancelledUIPressPhase. Indicates that the system has canceled tracking of this button-press sequence.
ChangedUIPressPhase. Indicates that either the location of the button press or it's UIPress.Force has changed.
EndedUIPressPhase. Indicates that the button has been released.
StationaryUIPressPhase. Indicates that the button is still down, with the same location and force as previously.