解决方法
baseNavgationController重写方法- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated
- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated {
if (self.viewControllers.count > 0) {
// 当前导航栏, 只有第一个viewController push的时候设置隐藏
if (self.viewControllers.count == 1) {
viewController.hidesBottomBarWhenPushed = YES;
}
} else {
viewController.hidesBottomBarWhenPushed = NO;
}
[super pushViewController:viewController animated:animated];
}
网友评论