I am using a UITabBarController in my application and when I switch between tabs I want to hide the tabbar in one of the tabs.
I tried
self.tabBarController.tabBar.hidden = YES;
Although the tabs dont appear I can still see the tabbar on the bottom of my screen.
I also tried setting the frame of tabbar but of no use. I tried setting height of it to zero which was also of no use.
my app design is something similar to this. I have two navigation开发者_开发技巧 controllers with root view controllers initialised and I added these navigation controllers to a tabbar controller. I've searched other related topics and tried methods told over there but nothing helped me.
Does anyone have any idea how to do it?
You can not directly hide the tab bar like this. Tab bar can be hidden/unhidden while pushing/popping views like:
SampleViewController *obj = [[SampleViewController alloc] init];
[obj setHidesBottomBarWhenPushed:YES];
[self.navigationController pushViewController:obj animated:YES];
[obj release];
精彩评论