一.IOS隐藏tabBar的方法:
self.tabBarController.tabBar.hidden = YES;
但是我们跳转隐藏tabBar需要的不是这段代码.
二.push跳转隐藏tabBar
如果在push跳转时需要隐藏tabBar,设置self.hidesBottomBarWhenPushed=YES;并在push后设置self.hidesBottomBarWhenPushed=NO;这样back回来的时候,tabBar会恢复正常显示。代码如下:
NextViewController *next=[[NextViewController alloc]init];
next. hidesBottomBarWhenPushed = YES;
[self.navigationController pushViewController:next animated:YES];
END