Instance Property

pausesOnCompletion

A Boolean value that indicates whether a completed animation remains in the active state.

Declaration

@property(nonatomic) BOOL pausesOnCompletion;

Discussion

When the value of this property is YES, the animator remains in the UIViewAnimatingStateActive state when the animation finishes, and it does not execute its completion handler. Keeping the animator in the UIViewAnimatingStateActive state allows you to reverse the animation even after it has finished. When the value of this property is NO, the animator automatically transitions to the UIViewAnimatingStateInactive state when the animation finishes, thereby concluding the animation. The default value of this property is NO.

Because the completion handler is not called when this property is YES, you cannot use the animator's completion handler to determine when the animations have finished running. Instead, you determine when the animation has ended by observing the running property.

See Also

Accessing the Animation Parameters

duration

The total duration (in seconds) of the main animations.

delay

The delay (in seconds) after which the animations begin.

timingParameters

The information used to determine the timing curve for the animation.

interruptible

A Boolean value indicating whether the animator is interruptible and can be paused or stopped.

userInteractionEnabled

A Boolean value indicating whether views receive touch events while animations are running.

manualHitTestingEnabled

A Boolean value indicating whether your app manages hit-testing while animations are in progress.

scrubsLinearly

A Boolean value indicating whether a paused animation scrubs linearly or uses its specified timing information.