Instance Method

stopAnimation:

Stops the animations at their current positions.

Required.

Declaration

- (void)stopAnimation:(BOOL)withoutFinishing;

Parameters

withoutFinishing

A Boolean indicating whether any final actions should be performed. Specify YES to clear any animations and move the animator directly to the UIViewAnimatingStateInactive state without performing any final actions. Specify NO to put the animator into the UIViewAnimatingStateStopped state.

Discussion

Call this method when you want to end the animations at their current position. This method removes all of the associated animations from the execution stack and sets the values of any animatable properties to their current values. This method also updates the state of the animator object based on the value of the withoutFinishing parameter.

If you specify NO for the withoutFinishing parameter, you can subsequently call the finishAnimationAtPosition: method to perform the animator’s final actions. For example, a UIViewPropertyAnimator object executes its completion blocks when you call this method. You do not have to call the finishAnimationAtPosition: method right away, or at all, and you can perform other animations before calling that method.

See Also

Starting and Stopping the Animations

- startAnimation

Starts the animation from its current position.

Required.

- startAnimationAfterDelay:

Starts the animation after the specified delay.

Required.

- pauseAnimation

Pauses a running animation at its current position.

Required.

- finishAnimationAtPosition:

Finishes the animations and returns the animator to the inactive state.

Required.