首页 > 代码库 > 跳转隐藏UITabBar

跳转隐藏UITabBar

 

  
//方法一
在跳转的事件里面写

   UIViewController *viewController = [[UIViewController alloc] init];

    viewController.hidesBottomBarWhenPushed = YES;

    [self.navigationController pushViewController:viewControllerr animated:YES];

 

//方法2

    self.tabBar.hidden = YES;
    for (UIView *view in self.view.subviews) {
        if (![view isKindOfClass:[UITabBar class]]) {
            view.frame = self.view.bounds;
            [view setBackgroundColor:[UIColor clearColor]];
        }
    }

跳转隐藏UITabBar