Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有两个视图控制器。第一个视图控制器被添加到隐藏导航栏的窗口上。从那里我加载另一个视图控制器,它有一个蓝色的导航栏并且没有隐藏。按下后退按钮时,此导航栏的颜色在隐藏前变为黑色。我应该怎么做才能解决这个问题?
谢谢
要隐藏导航栏,您必须这样做
[self.navigationController setNavigationBarHidden:YES];
应用这个
-(void)viewWillAppear:(BOOL)animated { [self.navigationController setNavigationBarHidden:YES animated:YES]; }