Possible Duplicate:
Cancel a UIView animation?
i need to stop an UIView animation. I know i can use [object.layer removeAllAnimations];
but this doesn't stop the animation, but "skip" it. So, if my original animation is :
[UIView animateWithDuration:8.0 delay:0.0 options:UIViewAnimationOptionAllowUserInteraction animations:^ (void) {
[ingredient setFrame:CGRectMake(20, 200, 34, 45)];
} completion:^ (BOOL finished) {
NSLog(@"Completed");
}];
the object ingredient will have the frame that would have if the animation had finished. Instead, i want the object STOP in specific point, without the animation complete.