Change animation for UINavigationController NavigationBar

Right now when I use [self.navigationController setNavigationBarHidden: NO animated: YES];

The navigation bar moves from right to left, is there any way to reset it from top to bottom?

+5
source share
1 answer

Give this move:

CATransition *transition = [CATransition animation];
transition.duration = kAnimationDuration;
transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
transition.type = kCATransitionPush;
transition.subtype = kCATransitionFromTop;
transition.delegate = self;
[self.navigationController.view.layer addAnimation:transition forKey:nil];

self.navigationController.navigationBarHidden = NO;
[self.navigationController pushViewController:tableViewController animated:YES];

Worked great for me.

Source: http://www.iphonedevsdk.com/forum/iphone-sdk-development/25045-navigation-controller-custom-animation.html

+12
source

All Articles