美文网首页
iOS隐藏tabBar的方法

iOS隐藏tabBar的方法

作者: 顺其自然_Cao | 来源:发表于2018-03-08 11:59 被阅读0次

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];

}

相关文章

网友评论

      本文标题:iOS隐藏tabBar的方法

      本文链接:https://www.haomeiwen.com/subject/ezzefftx.html