I was wondering how I can set an animation to repeat. The number of repetitions needs to be determined by a variable. In the following code, the variable int newPage
the reason you arent seeing but one animation is that due to the fact that you are calling the animation from a loop in the same runloop, resuting in the last call winning (one animation)
instead of calling [self animatePage]
, try calling
[self performSelector:@selector(animatePage) withObject:nil afterDelay:.1 *temp];
this will create your calls on separate threads.
you may need to play with the delay interval