共用方式為


UIView.InheritedAnimationDuration 屬性

定義

靜態方法,以秒為單位傳回目前作用中的動畫持續時間。

[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 9, 0, ObjCRuntime.PlatformArchitecture.All, null)]
public static double InheritedAnimationDuration { [Foundation.Export("inheritedAnimationDuration")] [ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 9, 0, ObjCRuntime.PlatformArchitecture.All, null)] get; }
member this.InheritedAnimationDuration : double

屬性值

預設值為 0。

屬性

備註

此屬性會顯示目前作用中動畫的持續時間。

UIView.Animate(2.0, () => {
    //...Animation
    var inheritedDuration = UIView.InheritedAnimationDuration;
    // inheritedDuration == 2.0
});
var defaultDuration = UIView.InheritedAnimationDuration;
// defaultDuration == 0.0

適用於