Adds the specified completion block to the animator.
- iOS 10.0+
- Mac Catalyst 13.0+
- tvOS 10.0+
A block to execute when the animations finish. This block has no return value and takes the following parameter:
The ending position of the animations. Use this value to determine whether the animations stopped at the beginning, end, or somewhere in the middle.
Completion blocks are executed after the animations finish normally. If you call the
stop method, the completion blocks are not called if you specify
true for the method’s parameter. If you specify
false for the parameter, the animator executes the completion blocks normally after you call the its
You may add completion blocks to an animator at any time, including while it is stopped.