push頁面後隱藏tabbar,pop後顯示tabbar
阿新 • • 發佈:2019-01-27
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];
}