views:

645

answers:

2

Hi,

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 ?

Cheers,

Chacha

A: 

For modally presented view controllers, you can change the animation with the modalTransitionStyle property. AFAIK, there is no way to change a navigation controller's push animation (except rebuilding UINavigationController from scratch).

Ole Begemann
Okay, should be enough for now ;) Thks.
chacha
+4  A: 

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

John
can we slow down the animation l'll bit?Its quite fast..Regards
shishir.bobby
you can use setAnimationDuration to specify a duration in seconds like[UIView setAnimationDuration:1.5];
John