Created
April 28, 2009 11:40
-
-
Save tranqy/103091 to your computer and use it in GitHub Desktop.
This file contains 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) flipFromView:(UIViewController*)fromView toView:(UIViewController*)toView inDirection:(UIViewAnimationTransition)direction { | |
[UIView beginAnimations:nil context:NULL]; | |
[UIView setAnimationDuration:1]; | |
[UIView setAnimationTransition:direction forView:[fromView view] cache:YES]; | |
[toView viewWillAppear:YES]; | |
[fromView viewWillDisappear:YES]; | |
[[fromView view] removeFromSuperview]; | |
[window addSubview:[toView view]]; | |
[toView viewDidAppear:YES]; | |
[fromView viewDidDisappear:YES]; | |
[UIView commitAnimations]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment