A value of 0
, 1
, or 2
, indicating the stage of a gesture event of type NSEvent
.
SDK
- macOS 10.10.3+
Framework
- App
Kit
Declaration
var stage: Int { get }
Discussion
Gesture events of type NSEvent
can go through multiple stages. This property indicates the current stage of the event.
If this property has a value of 0
, there is not enough pressure being applied to initiate or continue with the gesture. Effectively, this value will exist only when an event ends, as some level of pressure will be applied throughout the gesture.
A value of 1
indicates that the user has applied enough pressure to represent a mouse-down event.
A value of 2
suggests that the user has applied additional pressure beyond what is required for a typical mouse-down event. A stage value of 2
should generally be used to initiate a lookup or immediate action; for example, force clicking (pressing harder) on an element, such as a contact in an email message, to display a Quick Look window or to enter edit mode.
Typically, as a gesture event moves between stages, the user will receive light tactile feedback.
Stages do not always occur in sequence. For example, ending the gesture with a stage value of 2
may result in an immediate transition to a stage value of 0
. As such, the gesture event may skip over stage 1.