隐藏自定义的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;

}

posted @ 2016-01-11 16:57  YouNeedCourage  阅读(332)  评论(0编辑  收藏  举报