Type Method

setAnimationsEnabled:

Sets whether animations are enabled.

Declaration

+ (void)setAnimationsEnabled:(BOOL)enabled;

Parameters

enabled

Specify YES to enable animations or NO to disable them.

Discussion

Animations are enabled by default. If you disable animations, code inside subsequent animation blocks is still executed but no animations actually occur. Thus, any changes you make inside an animation block are reflected immediately instead of being animated. This is true whether you use the block-based animation methods or the begin/commit animation methods.

This method affects only those animations that are submitted after it is called. If you call this method while existing animations are running, those animations continue running until they reach their natural end point.

See Also

Animating Views

+ beginAnimations:context:

Marks the beginning of a begin/commit animation block.

Deprecated
+ commitAnimations

Marks the end of a begin/commit animation block and schedules the animations for execution.

Deprecated
+ setAnimationStartDate:

Sets the start time for the current animation block.

Deprecated
+ setAnimationDelegate:

Sets the delegate for any animation messages.

Deprecated
+ setAnimationWillStartSelector:

Sets the message to send to the animation delegate when the animation starts.

Deprecated
+ setAnimationDidStopSelector:

Sets the message to send to the animation delegate when animation stops.

Deprecated
+ setAnimationDuration:

Sets the duration (measured in seconds) of the animations in an animation block.

Deprecated
+ setAnimationDelay:

Sets the amount of time (in seconds) to wait before animating property changes within an animation block.

Deprecated
+ setAnimationCurve:

Sets the curve to use when animating property changes within an animation block.

Deprecated
+ setAnimationRepeatCount:

Sets the number of times animations within an animation block repeat.

Deprecated
+ setAnimationRepeatAutoreverses:

Sets whether the animations within an animation block automatically reverse themselves.

Deprecated
+ setAnimationBeginsFromCurrentState:

Sets whether the animation should begin playing from the current state.

Deprecated
+ setAnimationTransition:forView:cache:

Sets a transition to apply to a view during an animation block.

Deprecated
areAnimationsEnabled

Returns a Boolean value indicating whether animations are enabled.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software