Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flip animation when controller pushed on iPhone

I had a look around and didn't find what I was exactly looking for.

Is there a way to get a flip animation when pushing a view controller?

I read that you can change the animation by using a modal view controller but AFAIK the animation for a modal view is from bottom to top and that's not what i am looking for. Is there a way to get a flip animation somehow?

like image 895
chacha Avatar asked Mar 24 '10 09:03

chacha


1 Answers

something like this should work

[UIView beginAnimations:@"animation" context:nil];
[self.navigationController pushViewController: yourviewcontroller animated:NO]; 
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft forView:self.navigationController.view cache:NO]; 
[UIView commitAnimations];

don't forget to set animated to NO when calling pushViewController

like image 176
John Avatar answered Oct 08 '22 19:10

John