Created
September 6, 2013 03:42
-
-
Save convexstyle/6459244 to your computer and use it in GitHub Desktop.
Immediately, cancel previous UIView animation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)startAnimation:(id)sender { | |
UIView animateWithDuration:2.0f delay:0.0f options:UIViewAnimationCurveEaseInOut animations:^{ | |
_yourView.alpha = 0.0f; | |
} completion:^(BOOL finished) { | |
// Do something | |
}]; | |
} | |
- (void)stopAnimation:(id)sender { | |
[UIView setAnimationBeginsFromCurrentState:YES]; | |
[UIView animateWithDuration:0.001 animations:^{ | |
_yourView.alpha = 1; | |
}]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment