Share via


UIView.UserInteractionEnabled 属性

定义

确定此视图是否处理输入事件。

public virtual bool UserInteractionEnabled { [Foundation.Export("isUserInteractionEnabled")] get; [Foundation.Export("setUserInteractionEnabled:")] set; }
member this.UserInteractionEnabled : bool with get, set

属性值

属性

注解

此属性用于控制是否将输入事件传递到视图。 默认情况下,所有视图都接收事件。

在动画期间,除非传递 UIViewAnimationOptions,否则 UIKit 将禁用事件传递到视图。动画函数的 AllowUserInteraction 标志。

适用于