我试过隐藏顶部导航栏的3种方法,但它没有隐藏。
我试过
[self.navigationController setToolbarHidden:YES];
使用此代码
符合UINavigationControllerDelegate(void)navigationController:(UINavigationController *)navigationController
willShowViewController:(UIViewController *)
viewController animated:(BOOL)animated
{
BOOL shouldHide = [viewController.toolbarItems count] == 0;
[navigationController setToolbarHidden:shouldHide animated:animated];
}
在检查器中TopbarHidden也设置为True,当我将nib加载到UIView中时......
UINavigationController *NAV_instructions = [[UINavigationController alloc] initWithRootViewController:instructions];
[NAV_instructions setToolbarHidden:YES];
[NAV_instructions setModalTransitionStyle:UIModalTransitionStylePartialCurl];
如何隐藏到顶部栏?
答案 0 :(得分:0)
试试这个:
self.navigationController.navigationBarHidden = YES;