Sets the number of times animations within an animation block repeat.
- iOS 2.0–13.0Deprecated
- Mac Catalyst 13.0–13.0Deprecated
- tvOS 9.0–13.0Deprecated
The number of times animations repeat. This value can be a fraction. If you specify the value
0, the animation is performed once without repeating.
Use this method to specify the number of times to repeat the specified animations. This method does nothing if called from outside of an animation block. You can use this method in conjunction with either the block-based methods or the begin/commit methods for defining an animation block. If you do not explicitly set a repeat count, the animation is not repeated.
If you pass the
repeat option to the
animate(with method without setting an explicit repeat count, the animation repeats indefinitely. If you want the animation to repeat a finite number of times, call this method from inside your block.