问题描述
我有一个实现 UINavigationController 的菜单屏幕,在该屏幕顶部,使用 presentModalViewController,我放置了另一个屏幕,我希望在该屏幕上拥有另一个 UINavigationController代码>.我试图实现另一个导航控制器来处理新屏幕,但我要么在屏幕下方的 1/8 处得到一个导航栏,要么崩溃,要么什么也没有.我试过 [[UINavigationController alloc] initWithRootViewController:navigationConroller] 也没有成功.我只是在使用 pushViewController 来尝试将下一个 nib 放在不起作用的堆栈上.我做错了什么?
I have a menu screen that implements UINavigationController and on top of that screen, using presentModalViewController, I place another screen on which I want to have another UINavigationController. I have tried to implement another navigation controller to handle the new screen but I either get a navbar 1/8th the way down the screen and it crashes or nothing at all. I have tried [[UINavigationController alloc] initWithRootViewController:navigationConroller] with no success as well. I'm just using pushViewController to try and place the next nib on the stack which doesn't work. What am I doing wrong?
推荐答案
虽然有很多人在论坛上说苹果不允许这样做,但我已经让它工作了.你要做的是:
Although there are a lot of people saying on forums that Apple doesn't allow this I have got it to work. What you have to do is:
Map *mapScreen = [[[Map alloc] init] autorelease];
mapScreen.delegate = self;
UINavigationController *navController = [[[UINavigationController alloc] initWithRootViewController:mapScreen] autorelease];
[self presentModalViewController:navController animated:YES];
这篇关于UINavigationController 与 presentModalViewController的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!


大气响应式网络建站服务公司织梦模板
高端大气html5设计公司网站源码
织梦dede网页模板下载素材销售下载站平台(带会员中心带筛选)
财税代理公司注册代理记账网站织梦模板(带手机端)
成人高考自考在职研究生教育机构网站源码(带手机端)
高端HTML5响应式企业集团通用类网站织梦模板(自适应手机端)