ios tabbar显示隐藏封装处理

重写UINavigationController的push方法

- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated{
    if (self.viewControllers.count > 0) {
      viewController.hidesBottomBarWhenPushed = YES;
    }
    [super pushViewController:viewController animated:animated];
}
原文地址:https://www.cnblogs.com/zk1947/p/14360814.html