解决隐藏导航栏过渡动画出现的白板bug

问题

A界面push到B界面,在B界面需要隐藏导航栏,直接使用self.navigationController.navigationBar.hidden = YES; 过渡动画明显出现白板现象

解决方案
- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
     [self.navigationController setNavigationBarHidden:YES animated:animated];
}
 
  - (void)viewWillDisappear:(BOOL)animated {
    [super viewWillDisappear:animated];
     [self.navigationController setNavigationBarHidden:NO animated:animated];
    
}

你可能感兴趣的:(解决隐藏导航栏过渡动画出现的白板bug)