兩種方法用來隱藏tabBar
1.在本頁面隱藏
#pragma mark - 隱藏tabBar
- (void)viewWillAppear:(BOOL)animated{
self.tabBarController.tabBar.hidden = YES;
}
- (void)viewWillDisappear:(BOOL)animated{
self.tabBarController.tabBar.hidden = NO;
}
2.再跳界面之前設置跳轉(zhuǎn)后隱藏tabBar
#pragma mark - 隱藏tabBar
- (void)handleClickTestButtonAction:(UIButton *)sender{
SecurityTestingViewController *test = [[SecurityTestingViewController alloc]init];
self.hidesBottomBarWhenPushed = YES;
[self.navigationController pushViewController:test animated:NO];
}