Reputation: 1251
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,
I guess it is because the view's tab bar style is not set to None.Just like the IB's view setting below:
How to solve this problem, thx
Upvotes: 1
Views: 412
Reputation: 6529
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
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.
Upvotes: 2