Instance Property

isEnabled

A Boolean property that indicates whether the gesture recognizer is enabled.

Declaration

var isEnabled: Bool { get set }

Discussion

Disables a gesture recognizers so it does not receive touches. The default value is true. If you change this property to false while a gesture recognizer is currently recognizing a gesture, the gesture recognizer transitions to a cancelled state.

See Also

Getting the Recognizer’s State and View

var state: UIGestureRecognizer.State

The current state of the gesture recognizer.

var view: UIView?

The view the gesture recognizer is attached to.