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
Did you try to set the repeatCount? + (void)setAnimationRepeatCount:(float)repeatCount
I've tried the following code block, and it definitely repeats 2x for me (l was a UITextView that was scaled up by 2x in X dir and 3X in Y dir):
[UIView animateWithDuration:2
delay:0.1
options:UIViewAnimationOptionCurveEaseIn
animations:^{ [UIView setAnimationRepeatCount:2];
l.transform = CGAffineTransformMakeScale(2,3); } completion:nil];