Instance Property

isUserInteractionEnabled

A Boolean value that determines whether user events are ignored and removed from the event queue.

Declaration

var isUserInteractionEnabled: Bool { get set }

Discussion

When set to false, user events—such as touch and keyboard—intended for the view are ignored and removed from the event queue. When set to true, events are delivered to the view normally. The default value of this property is true.

During an animation, user interactions are temporarily disabled for all views involved in the animation, regardless of the value in this property. You can disable this behavior by specifying the allowUserInteraction option when configuring the animation.