问题描述
我的应用程序位于UINavigationController之下,因此位于UINavigationBar之下.我想在此UINavigationBar上方显示一个Modal View Controller,因为如果我编写的控制器在它下面,则没有意义(也就是说,在显示此View Controller时,我想隐藏导航栏).
I have my app that is below a UINavigationController and therefore below a UINavigationBar. I want to present a Modal View Controller on top of this UINavigationBar because the controller I wrote doesn't make sense if it's below it (that is, I want to hide the navigation bar when showing this view controller).
用以下代码表示:
ukc = [[UnlockKeyboardViewController alloc] init];
[self presentModalViewController:ukc animated:NO];
使模态"视图控制器位于UINavigationBar下方.当我显示此模式视图时,不应显示该UINavigationBar.我该如何解决?
Cause the Modal view controller to be below the UINavigationBar. That UINavigationBar shouldn't show up when I show this modal view. How can I go around that?
PS:这是一个越狱应用,因此没有Interface Builder.
PS: This is a jailbreak app, so there's no Interface Builder.
推荐答案
[self.navigationController presentModalViewController:ukc animated:NO];
这篇关于目前在UINavigationController之上的模态视图控制器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!