Question

I have tried two kinds of methods below:


1.[self.tabBarController.tabBar setHidden:YES];


2. self.navigationController.hidesBottomBarWhenPushed = YES;

[self.navigationController pushViewController:OneViewController animated:YES];

But the result is that the tabbar items is hidden, but there is still a black block there, enter image description here

I guess it is because the view's tab bar style is not set to None.Just like the IB's view setting below: enter image description here

How to solve this problem, thx

Was it helpful?

Solution

To hide the nav bar use this code

[[self navigationController] setNavigationBarHidden:YES animated:YES];

To show the nav bar you can use this code

[[self navigationController] setNavigationBarHidden:NO animated:YES];

And here is the doc's that might be helpful my friend

https://developer.apple.com/library/ios/ipad/#documentation/uikit/reference/UINavigationController_Class/Reference/Reference.html

Hope that helps you man.

EDIT

Here is a github project for hiding the tab bar. Hope this helps you.

https://github.com/idevsoftware/Cocoa-Touch-Additions/tree/master/UITabBarController_setHidden

Let me know if this is what ou are looking for and if you need more help man.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top