Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Hide Tab Bar Controller?

Tags:

How to Hide Tab Bar Controller ? I want to hide the Tab Bar controller with double tap on UIImageView.

like image 253
Gaurav Patel Avatar asked Sep 19 '11 05:09

Gaurav Patel


People also ask

How do you hide the tab bar when a view controller is shown?

If you don't want that behavior, you should set hidesBottomBarWhenPushed to true where applicable. This will hide the tab bar along with any toolbars you had showing, but only when a view controller is pushed onto the navigation stack. This allows you to show the tab bar at first, then hide it when you need more room.

How do I hide tab bar?

Hide Tabs Using F11 Shortcut Pressing the F11 button on your keyboard makes Google Chrome go into full-screen view. This, in turn, hides the address bar and all the tabs from the toolbar menu.

How do I hide the tab bar in Objective C?

In case you're using tabbar with navigation controller hidesBottomBarWhenPushed will not work, but tabBarController. tabBar. hidden will do.

How do I hide the bottom bar in Swift?

Answer: Use self. tabBarController?. tabBar. hidden instead of hidesBottomBarWhenPushed in each view controller to manage whether the view controller should show a tab bar or not.


1 Answers

Try this code:

[self.tabBarController.tabBar setHidden:YES]; 

where tabbarcontroller is needed to be defined...

EDIT

AppDelegateFileName *appDelegate = (AppDelegateFileName *) [[UIApplication sharedApplication] delegate]; [appDelegate.tabbarController.tabBar setHidden:YES]; 

before doing this make sure that you create a @property declaration of tabbarController in appDelegate .h file.

like image 80
DShah Avatar answered Nov 17 '22 19:11

DShah