Contents

duration

The duration of the animation, in seconds.

Declaration

var duration: TimeInterval { get set }

Discussion

The value of this property must be greater than or equal to 0. Setting the duration to a negative value raises an exception.

You can change the duration of an animation while it is running. Setting the duration to a value that is less than the current progress value ends an in-progress animation.

See Also

Configuring an Animation