我在 viewDidLoad 中隐藏了状态栏和导航栏
- (void)viewDidLoad {
[super viewDidLoad];
[self.navigationController setNavigationBarHidden:YES animated:YES];
[[UIApplication sharedApplication] setStatusBarHidden:YES];
}
一切正常。但是,当我关闭视图控制器时,在 viewWillDisappear: 我做:
- (void)viewWillDisappear:(BOOL)animated {
[super viewWillDisappear:animated];
[self.navigationController setNavigationBarHidden:NO animated:YES];
[[UIApplication sharedApplication] setStatusBarHidden:NO];
}
这导致我的所有观点都处于不利地位:
我究竟做错了什么?谢谢