在push之前将控制器的属性hidesBottomBarWhenPushed
设置为yes就好。
//准备要把控制器vc给push出去了
UIViewController *vc = [[UIViewController alloc]init];
vc.hidesBottomBarWhenPushed = YES;
/*push没动静NSLog(@"%@",self.navigationController);检查自己的控制器是不是为空*/
[self.navigationController pushViewController:vc animated:YES];