Type Method

commitAnimations()

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

Declaration

class func commitAnimations()

Discussion

If the current animation set is the outermost set, this method starts the animations when the application returns to the run loop. If the current animation set is nested inside another set, this method waits until the outermost set of animations is committed, at which point it commits all of the animations together.

Animations run in a separate thread to avoid blocking the application. In this way, multiple animations can be piled on top of one another. See setAnimationBeginsFromCurrentState(_:) for how to start animations while others are in progress.

Use of this method is discouraged in iOS 4.0 and later. You should use the block-based animation methods to specify your animations instead.

See Also

Animating Views

class func beginAnimations(String?, context: UnsafeMutableRawPointer?)

Marks the beginning of a begin/commit animation block.

Deprecated
class func setAnimationStart(Date)

Sets the start time for the current animation block.

Deprecated
class func setAnimationsEnabled(Bool)

Sets whether animations are enabled.

class func setAnimationDelegate(Any?)

Sets the delegate for any animation messages.

Deprecated
class func setAnimationWillStart(Selector?)

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

Deprecated
class func setAnimationDidStop(Selector?)

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

Deprecated
class func setAnimationDuration(TimeInterval)

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

Deprecated
class func setAnimationDelay(TimeInterval)

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

Deprecated
class func setAnimationCurve(UIView.AnimationCurve)

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

Deprecated
class func setAnimationRepeatCount(Float)

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

Deprecated
class func setAnimationRepeatAutoreverses(Bool)

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

Deprecated
class func setAnimationBeginsFromCurrentState(Bool)

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

Deprecated
class func setAnimationTransition(UIView.AnimationTransition, for: UIView, cache: Bool)

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

Deprecated
class var areAnimationsEnabled: Bool

Returns a Boolean value indicating whether animations are enabled.