今天写项目时遇到了一个问题:一个自定义的tabbar(继承了系统的UITabBarController),用导航的push跳转到下一个页面时想隐藏该tabbar,用
hidesBottomBarWhenPushed
没有起作用,原来 hidesBottomBarWhenPushed 适用于系统的tabbar,自定义的tabbar不能通过 hidesBottomBarWhenPushed 属性简单的设置。以下是我的解决方法:
1.在自定义tabbar的页面,添加如下方法
-(void)setHidesBottomBarWhenPushed:(BOOL)hidesBottomBarWhenPushed
{
myTabBarView.hidden = hidesBottomBarWhenPu