Share via


UIView.AnimationsEnabled 属性

定义

指定是否显示动画。

public static bool AnimationsEnabled { [Foundation.Export("areAnimationsEnabled")] get; [Foundation.Export("setAnimationsEnabled:")] set; }
member this.AnimationsEnabled : bool with get, set

属性值

默认值为 true

属性

注解

不建议使用此方法。 应用程序开发人员应首选使用 UIViewPropertyAnimator 类来对 UIView 进行动画处理。

无论这是 true 还是 false,都将执行动画块内的代码。 值 false 仅表示动画不显示。

在现有动画期间设置此值不会修改该动画的显示。

适用于

另请参阅

  • <xref:UIKit.UIView.PerformWithoutAnimation>