推/弹出时,UINavigationBar会消失
我正在使用这里描述的方法使用旧的(pre-iOS7)push / pop动画:
@implementation UINavigationController (Retro)
- (void)pushViewControllerRetro:(UIViewController *)viewController {
CATransition *transition = [CATransition animation];
transition.duration = 0.25;
transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
transition.type = kCATransitionPush;
transition.subtype = kCATransitionFromRight;
[self.view.layer addAnimation:transition forKey:nil];
[self pushViewController:viewController animated:NO];
}
- (void)popViewControllerRetro {
CATransition *transition = [CATransition animation];
transition.duration = 0.25;
transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
transition.type = kCATransitionPush;
transition.subtype = kCATransitionFromLeft;
[self.view.layer addAnimation:transition forKey:nil];
[self popViewControllerAnimated:NO];
}
@end
我的问题是,推动新视图控制器时,iOS7似乎会淡化前一个视图控制器的UINavigationBar
。 通常情况下,这看起来很好,因为iOS 7将视图拖到彼此顶部。 但是,当我使用iOS7之前的动画时,它会给我一个短暂的闪光,因为导航栏会从右侧推入新视图。
有没有办法在导航栏上禁用淡入淡出动画?
链接地址: http://www.djcxy.com/p/90339.html