Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hide the tab bar in a tab bar application

I have created a new project from the template:

IPhoneOS>Application>Tab Bar Application.

I get two tabs.

How can I make the second become a full screen hiding the tab bar and even the status bar?

I tried to check the "Wants Full screen" - but it didn't help.

(Much less important... When I do get a full screen I do I get back?)

Please give me a simple code/guidelines or a reference to them, cause I'm a beginner - and Me and the compiler got too many issues to make things worse

Thanks Asaf

like image 823
Asaf Avatar asked Jul 15 '10 05:07

Asaf


People also ask

How do I hide the tab bar?

Instead of the toolbar button, you can use the keyboard shortcut (Alt+Shift+A) to hide and restore tabs.

How do I hide the tab bar in Objective C?

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 and show tab bar in Swift?

Simply, Go to ViewController (in StoryBoard) -> Attribute inspector -> Under 'View Controller' section select 'Hide Bottom Bar on Push' checkbox. This works like a charm.

Why can't I hide tab bar in Safari?

Do you currently have multiple tabs open in Safari? If so, that would be why the option is unavailable/grayed out. You'd want to close out additional tabs so you only have one tab open in Safari, and then you should be able to select the Hide Tab Bar option in the View menu. Cheers!


1 Answers

To hide the tab bar you can use hidesBottomBarWhenPushed. For instance:

MyController *myController = [[MyController alloc]init]; 
myController.hidesBottomBarWhenPushed = YES;
[self.navigationController pushViewController:myController animated:YES];
[myController release];

To hide the status bar you can use:

[[UIApplication sharedApplication] setStatusBarHidden:YES];

To hide the nav bar you can use:

self.navigationController.navigationBarHidden = YES;
like image 89
RichardCase Avatar answered Oct 17 '22 01:10

RichardCase