隐藏自定义的tabbar
由controllerA推出controllerB
A中:
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
UIView *tabbar = [self.tabBarController.view viewWithTag:1000];
tabbar.hidden = NO;
self.tabBarController.tabBar.hidden = YES;
}
- (void)push {
BViewController *B = [[BViewController alloc] init];
B.hidesBottomBarWhenPushed = YES;
[self.navigationController pushViewController:B animated:YES];
}
B.中
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
UIView *tabbar = (UIView *)[self.tabBarController.view viewWithTag:1000];
tabbar.hidden = YES;
self.tabBarController.tabBar.hidden = YES;
}