SDK 6.1,目标6.1,使用故事板
aView
有一个UIButton
。我使用action segue [push]到bView
点击此按钮后,按bView
即可
但我弹出aView
有一个背栏,我该如何解决这个问题?
aView.m
-(void)viewWillAppear:(BOOL)animated{
[super viewWillAppear:animated];
[self.navigationController.navigationBar setHidden:YES];
}
bView.m
-(void)viewWillAppear:(BOOL)animated{
[super viewWillAppear:animated];
[self.navigationController.navigationBar setHidden:NO];
}
答案 0 :(得分:1)
我得到了你的问题。您正在使用viewWillAppear:
viewA
方法隐藏导航栏,而您没有动画。
试试这个
// This will add an animation like slide out. So you may won't like it.
[self.navigationController setNavigationBarHidden:YES animated:YES];
如果它不起作用,请在bView.m
中添加此代码- (void)viewWillDisappear:(BOOL)animated {
[self.navigationController setNavigationBarHidden:YES animated:NO];
[super viewWillDisappear:animated]
}