如何摆脱UINavigationController(iOS应用程序)中的灰色栏 [英] How do I get rid of the grey bar in UINavigationController (iOS app)
本文介绍了如何摆脱UINavigationController(iOS应用程序)中的灰色栏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当用户单击按钮时,我正在使用此代码在iOS应用中打开页面,但是当用户单击按钮时,页面顶部会出现一个灰色栏.我该如何摆脱呢?
I'm using this code to open up a page in my iOS app when a user clicks a button, but I get a grey bar at the top of the page when the user does so. How can I get rid of this?
- (IBAction) colours:(id)sender {
UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:colourPickerView];
[self presentViewController:navigationController animated:YES completion: nil];
}
推荐答案
您可能是指导航控制器创建的导航栏.
You could be referring to the navigation bar created by the navigation controller.
要隐藏它,只需使用它.
To hide it just use this.
[navigationController.navigationBar setHidden:YES];
这篇关于如何摆脱UINavigationController(iOS应用程序)中的灰色栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文