隱藏UITabBarController中的tabbar

在pushViewController以前調用:app

1 self.hidesBottomBarWhenPushed = YES;
2 ZWMessageViewController *messageController = [[ZWMessageViewController alloc] initWithDict:_dataSource[indexPath.row]];
3 [self.navigationController pushViewController:messageController animated:YES];

或者是在 - (void)viewWillAppear:(BOOL)animated 中設置 ide

self.hidesBottomBarWhenPushed = YES;

同時在viewWillDisappear調用:spa

1 - (void)viewWillDisappear:(BOOL)animated {
2         [super viewDidDisappear:animated];
3         self.hidesBottomBarWhenPushed = NO; // 不設置這個,界面跳轉回來的時候,tabbar不能成功顯示
4 }
相關文章
相關標籤/搜索