Instance Property

state

The current state of the animation.

Required.

Declaration

var state: UIViewAnimatingState { get }

Discussion

This property reflects the current state of the animation. An animator object starts in the inactive state. Calling the startAnimation() or pauseAnimation() method changes the state to active. Changing the fractionComplete property also moves the animator to the active state. The animator remains in the active state until its animations finish, at which point it moves back to the inactive state.

Calling the stopAnimation(_:) method changes the state of the animator to stopped. When in this state, the animations are stopped and cannot be restarted until you call the finishAnimation(at:) method, which returns the animator to the inactive state.

See Also

Getting the Animator’s State

var fractionComplete: CGFloat

The completion percentage of the animation.

Required.

var isReversed: Bool

A Boolean value indicating whether the animation is running in the reverse direction.

Required.

var isRunning: Bool

A Boolean value indicating whether the animation is currently running.

Required.