我正在开发一个基于导航的应用程序。我有几个视图控制器,它们在不同的情况下被推送到导航控制器中。以下是我用来推送新视图控制器的代码。
AnotherViewController *anotherViewController = [[AnotherViewController alloc] initWithNibName:@"AnotherView" bundle:nil];
[self.navigationController pushViewController:anotherViewController animated:YES];
[anotherViewController release];
我注意到的一件事是,当新的视图控制器被推出时,导航栏也会动画(滑动)。我在导航栏中有一个返回按钮、标题文本和右侧按钮。所以当导航栏被动画时,它看起来很奇怪。
有没有什么办法让导航栏保持固定,只有在推出新的视图控制器时才进行动画?