How to hide the tabBar when push a view? How to hide the tabBar when push a view? ios ios

How to hide the tabBar when push a view?


use this methood in the UIViewController class where you want to hide the tabBarController

-(BOOL)hidesBottomBarWhenPushed{    return YES;}

Update

As suggested by @Yuchen Zhong in his answer, This option is now available in the storyboard itself.

enter image description here


You can do this in storyboard now:

  1. Select the UIViewController in your storyboard
  2. Select the checkbox Hide Bottom Bar on Push

enter image description here


Set UIViewController.hidesBottomBarWhenPushed = YES when you want hide tab bar.

nextViewController.hidesBottomBarWhenPushed = YES;


matomo