Code:
[UIView beginAnimations:@"theAnimation" context:NULL];
[UIView setAnimationDuration:5.25];
[UIView setAnimationRepeatCount:FLT_MAX];
/*
or [UIView setAnimationRepeatAutoreverses:YES]:
*/
[UIView setAnimationDelegate:self];
[UIView setAnimationCurve:UIViewAnimationCurveLinear];
//view to animate
[UIView commitAnimations];
the above code sets off an animation that repeats forever. how can i tell it to stop or pause?
[EDIT] ok, so i managed to stop the animation by creating a new animation block targeting the same UIView, and making sure i could call [UIView setAnimationBeginsFromCurrentState:YES]; on the first, moving animation. for the stop animation block, i simply set the repeat count to 1, the duration to 0 seconds, and the view to which ever position i wanted it to stop or pause at... it's too bad there wasn't an easier way of achieving this with a simple stop command.