push页面后隐藏tabbar,pop后显示tabbar

1:push页面后隐藏tabba

在pushViewController之前调用 [self setHidesBottomBarWhenPushed:YES];

        [self setHidesBottomBarWhenPushed:YES];
        ARWMyProfileViewController *myProfileVC = [[ARWMyProfileViewController alloc] init];
        myProfileVC.navigationItem.title = @"My Profile";
        [self.navigationController pushViewController:myProfileVC animated:YES];
        

2:pop后显示tabbar

在viewWillDisappear调用:[self setHidesBottomBarWhenPushed:NO]; 

- (void)viewWillDisappear:(BOOL)animated {
    [super viewWillDisappear:animated];
    [self setHidesBottomBarWhenPushed:NO];

}


你可能感兴趣的:(Objective-C,IOS,+,Mac,OS)