修改RTRootNavigationController.m
- (void)pushViewController:(UIViewController *)viewController
animated:(BOOL)animated
{
if (viewController == nil) {
if (self.animationBlock) {
self.animationBlock(YES);
self.animationBlock = nil;
}
return;
}
if (self.viewControllers.count > 0) {
viewController.hidesBottomBarWhenPushed = self.hidesBottomBarWhenPushed;//新增
UIViewController *currentLast = RTSafeUnwrapViewController(self.viewControllers.lastObject);
[super pushViewController:RTSafeWrapViewController(viewController,
viewController.rt_navigationBarClass,
self.useSystemBackBarButtonItem,
currentLast.navigationItem.backBarButtonItem,
currentLast.navigationItem.title ?: currentLast.title)
animated:animated];
}
else {
[super pushViewController:RTSafeWrapViewController(viewController, viewController.rt_navigationBarClass)
animated:animated];
}
}
使用 BaseViewController
self.rt_navigationController.hidesBottomBarWhenPushed = YES;