Sukitha Udugamasooriya
Sukitha Udugamasooriya

Reputation: 2308

UINavigation/TabBar transition animation

How can I use UIViewAnimationTransition type in one of UINavigation/TabBar transitions ?

Upvotes: 1

Views: 2527

Answers (2)

Shawn Craver
Shawn Craver

Reputation: 1986

Only way I've found is to disable the built in transition animations, and use your own. I use something like the following for a UINavigationController:

UIViewAnimationTransition  trans = UIViewAnimationTransitionCurlUp;
[UIView beginAnimations: nil context: nil];
[UIView setAnimationDuration:0.5];
[UIView setAnimationTransition: trans forView: [delegate window] cache: YES];
[navController pushViewController:detailController animated:NO];
[UIView commitAnimations];

Upvotes: 5

kennytm
kennytm

Reputation: 523444

No you can't.

(For UINavigationController there's a private -pushViewController:transition:forceImmediate:.)

Upvotes: 2

Related Questions