iOS 隐藏Tabbar

两种方法用来隐藏tabBar

1.在本页面隐藏

#pragma mark - 隐藏tabBar

- (void)viewWillAppear:(BOOL)animated{

    self.tabBarController.tabBar.hidden = YES;

}

- (void)viewWillDisappear:(BOOL)animated{

  self.tabBarController.tabBar.hidden = NO;

}

2.再跳界面之前设置跳转后隐藏tabBar

#pragma mark - 隐藏tabBar

- (void)handleClickTestButtonAction:(UIButton *)sender{

    SecurityTestingViewController *test = [[SecurityTestingViewController alloc]init];

    self.hidesBottomBarWhenPushed = YES;

    [self.navigationController pushViewController:test animated:NO];

}

posted @ 2016-12-12 17:31  Oooliver  阅读(511)  评论(0编辑  收藏  举报
为用户提供更好的解决方案,技术改变世界