I\'m setting up the following UIView animateWithDuration:
method, with the intention of setting my animationOn
BOOL elsewhere in the program to can
Old but another option.
You can also setup another animation which is not repeating on the same view, that way you can also capture it in the current state and return it to how it is by using the option UIViewAnimationOptionBeginFromCurrentState. Your completion block is also called.
-(void)someEventSoStop
{
button.transform = CGAffineTransformMakeScale(1.0, 1.0);
[UIView animateWithDuration: 0.4
delay: 0.0
options: UIViewAnimationOptionCurveEaseOut | UIViewAnimationOptionBeginFromCurrentState
animations: ^{
button.transform = CGAffineTransformIdentity;
} completion: ^(BOOL finished){
}];
}