Cancel a UIView animation?
The way I do it is to create a new animation to your end point. Set a very short duration and make sure you use the +setAnimationBeginsFromCurrentState:
method to start from the current state. When you set it to YES, the current animation is cut short. Looks something like this:
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationBeginsFromCurrentState:YES];
[UIView setAnimationDuration:0.1];
[UIView setAnimationCurve: UIViewAnimationCurveLinear];
// other animation properties
// set view properties
[UIView commitAnimations];
Use:
#import <QuartzCore/QuartzCore.h>
.......
[myView.layer removeAllAnimations];