Type Method

setAnimationRepeatCount:

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

Declaration

+ (void)setAnimationRepeatCount:(float)repeatCount;

Parameters

repeatCount

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.

Discussion

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 UIViewAnimationOptionRepeat option to the animateWithDuration:delay:options:animations:completion: 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.

See Also

Animating Views

+ beginAnimations:context:

Marks the beginning of a begin/commit animation block.

Deprecated
+ commitAnimations

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

Deprecated
+ setAnimationStartDate:

Sets the start time for the current animation block.

Deprecated
+ setAnimationsEnabled:

Sets whether animations are enabled.

+ setAnimationDelegate:

Sets the delegate for any animation messages.

Deprecated
+ setAnimationWillStartSelector:

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

Deprecated
+ setAnimationDidStopSelector:

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

Deprecated
+ setAnimationDuration:

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

Deprecated
+ setAnimationDelay:

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

Deprecated
+ setAnimationCurve:

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

Deprecated
+ setAnimationRepeatAutoreverses:

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

Deprecated
+ setAnimationBeginsFromCurrentState:

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

Deprecated
+ setAnimationTransition:forView:cache:

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

Deprecated
areAnimationsEnabled

Returns a Boolean value indicating whether animations are enabled.