现在我使用[self.navigationController setNavigationBarHidden:NO animated:YES];
导航栏从右向左飞过,有没有办法从上到下放下它?
答案 0 :(得分:12)
放手一搏:
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];
对我来说很棒。