ios tabbar显示隐藏封装处理

重写UINavigationController的push方法

- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated{
    if (self.viewControllers.count > 0) {
      viewController.hidesBottomBarWhenPushed = YES;
    }
    [super pushViewController:viewController animated:animated];
}

 

posted @ 2021-02-02 10:55  zk1947  阅读(89)  评论(0编辑  收藏  举报