导航栏隐藏之后切换到下一页面之后,可能会有一下问题,转场很生硬。
(参考链接)[https://www.jianshu.com/p/7bec9ea95c86]
-(void)viewWillAppear:(BOOL)animated{
if (self.tabBarController.selectedIndex == 当前tab下标) {
[self.navigationController setNavigationBarHidden:YES animated:YES];
} else {
[self.navigationController setNavigationBarHidden:YES animated:NO];
}
}
-(void)viewWillDisappear:(BOOL)animated{
[self.navigationController setNavigationBarHidden:NO animated:YES];
}