편집

다음을 통해 공유


UIGestureRecognizerState Enum

Definition

An enumeration of states for a UIGestureRecognizer.

[ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.WatchOS, ObjCRuntime.PlatformArchitecture.All, null)]
public enum UIGestureRecognizerState
type UIGestureRecognizerState = 
Inheritance
UIGestureRecognizerState
Attributes

Fields

Name Value Description
Possible 0

The default state: no gesture is recognized, but the recognizer may be evaluating touch events.

Began 1

Touch object have begun that are recognized as a continuous gesture.

Changed 2

Touch objects that are part of a continuous gesture have changed.

Ended 3

Touch objects that are part of a continuous gesture have ended.

Recognized 3

A multi-touch has been recognized. The state is changed to UIGestureRecognizerState.Possible.

Cancelled 4

Touches have cancelled a continuous gesture.

Failed 5

An unrecognized multi-touch gesture has occurred.

Remarks

This describes the state of a UIGestureRecognizer. All of UIGestureRecognizers start in the Possible state. Once one or more touches has been received, the recognizers transition to the Began state. For one-shot patterns (like Tap), this will either transition into the Recognized state or the Failed state. For continuous gestures (like panning, pinching, rotating) the recognizer will transition to the Changed state and emit multiple calls back to the action and finally transition to either the Ended or Cancelled states.

Applies to