先說一下遇到的問題坊饶,再present一個視圖時,隱藏底部的tabbar殴蓬,回來的時候tabbar消失了
如果是push過去的話匿级,這樣就可以了。
// 進(jìn)入某個界面
NextViewController *nextVC = [[TypeSupplierViewController alloc] init];
// 根據(jù)點(diǎn)擊種類不同染厅,設(shè)立種類屬性
nextVC.hidesBottomBarWhenPushed=YES;// 進(jìn)入后隱藏tabbar
[self.navigationController pushViewController:nextVC animated:YES];
self.hidesBottomBarWhenPushed = NO;// 退出時顯示tabbar
但是present狀態(tài)下就不好使了痘绎,得這樣
AppDelegate *appdelegate=(AppDelegate*)[[UIApplication sharedApplication] delegate];
appdelegate.window.rootViewController.definesPresentationContext = YES;
[appdelegate.window.rootViewController presentViewController:presentedVC animated:YES completion:nil];
這樣的話回來的時候,tabbar就不會消失了