Type Method

setAnimationDidStop(_:)

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

Declaration

class func setAnimationDidStop(_ selector: Selector?)

Parameters

selector

The message sent to the animation delegate after animations end. The default value is NULL. The selector should be of the form: - (void)animationDidStop:(NSString *)animationID finished:(NSNumber *)finished context:(void *)context. Your method must take the following arguments:

  • animationID

    An NSString containing an optional application-supplied identifier. This is the identifier that is passed to the beginAnimations(_:context:) method. This argument can be nil.

  • finished

    An NSNumber object containing a Boolean value. The value is true if the animation ran to completion before it stopped or false if it did not.

  • context

    An optional application-supplied context. This is the context data passed to the beginAnimations(_:context:) method. This argument can be nil.

Discussion

If you specify an animation delegate for a begin/commit set of animations, you use this method to specify the selector to call after the animations end. This method does nothing if called from outside of an animation block. It must be called between calls to the beginAnimations(_:context:) and commitAnimations() methods. This selector is set to NULL by default.

Use of this method is discouraged in iOS 4.0 and later. If you are using the block-based animation methods, you can include your delegate’s end code directly inside your block.

See Also

Related Symbols

class func setAnimationDelegate(Any?)

Sets the delegate for any animation messages.

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

Marks the beginning of a begin/commit animation block.

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.