Type Method


Marks the beginning of a begin/commit animation block.


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



An application-supplied identifier for the animations.


Custom data that you want to associate with this set of animations. information that is passed to the animation delegate messages—the selectors set using the setAnimationWillStart(_:) and setAnimationDidStop(_:) methods.


This method signals to the system that you want to specify one or more animations to perform. After calling this method, configure the animation options (using the setAnimation… class methods) and then change the desired animatable properties of your views. When you are done changing your view properties, call the commitAnimations() method to close the set and schedule the animations.

You can nest sets of animations (by calling this method again before committing a previous set of animations) as needed. Nesting animations groups them together and allows you to set different animation options for the nested group.

If you install a start or stop selector using the setAnimationWillStart(_:) or setAnimationDidStop(_:) method, the values you specify for the animationID and context parameters are passed to your selectors at runtime. You can use these parameters to pass additional information to those selectors.

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

Related Symbols

class func setAnimationDelegate(Any?)

Sets the delegate for any animation messages.

class func commitAnimations()

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

class func setAnimationWillStart(Selector?)

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

class func setAnimationDidStop(Selector?)

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