开发者社区 问答 正文

请问 自定义tabBar怎么隐藏?

请问我自己自定义tabBar,在push到下一个控制器的时候应该怎么才能隐藏自己设置的tabBar?

展开
收起
爵霸 2016-03-06 14:59:52 2363 分享 版权
1 条回答
写回答
取消 提交回答
  • 重写NavigationController的 pushViewController: animated:方法

    -(void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated
    {
       viewController.hidesBottomBarWhenPushed = YES;
       [super pushViewController:viewController animated:YES];
    }
    2019-07-17 18:54:38
    赞同 展开评论
问答地址: