state
The current state of the animation.
Declaration
var state: UIViewAnimatingState { get }Discussion
This property reflects the current state of the animation. An animator object starts in the UIViewAnimatingState.inactive state. Calling the startAnimation() or pauseAnimation() method changes the state to UIViewAnimatingState.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 UIViewAnimatingState.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.