在某种情况下,一级页面隐藏Navigationbar, 而二级页面就得打开navigationbar, 这种情况,如果采取默认的Viewwillappear中处理,则会出现大片黑色阴影,解决方案如下
在一级页面写上下面这句
- (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
[self.navigationController setNavigationBarHidden:YES animated:YES];
}
在二级页面展示Navigationbar,然后写上:
- (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
[self.navigationController setNavigationBarHidden:NO animated:YES];
}