How to hide UITabBar?

前端 未结 4 1626
孤独总比滥情好
孤独总比滥情好 2020-12-02 20:21

In my app I have a tab bar. And in some views I as well have a toolbar. So when I come to those views with a toolbar it looks ugly - two bars at the bottom of the view. I th

4条回答
  •  半阙折子戏
    2020-12-02 20:37

    You have to use set the hidesBottomBarWhenPushed property to YES on the controller that you are pushing and NOT to the UITabBarController.

    otherController.hidesBottomBarWhenPushed = YES;
    [navigationController pushViewController: otherController animated: TRUE];
    

    Or you can set the property when you first initialize the controller you want to push.

提交回复
热议问题