Iphone 在navigationController中显示模态ViewController

Iphone 在navigationController中显示模态ViewController,iphone,uiviewcontroller,uinavigationcontroller,Iphone,Uiviewcontroller,Uinavigationcontroller,我有一个继承navigationController属性的viewController,但当我单击此视频中的图像时,我需要以模式显示viewController 看这里:我是这样做的: *我创建了一个新的navigationController,其根视图是我需要呈现的视图,并以模式呈现我的新navigationController** moviePlayer = [[[CustomMoviePlayerViewController alloc] initWithPath:path1] autor

我有一个继承navigationController属性的viewController,但当我单击此视频中的图像时,我需要以模式显示viewController

看这里:我是这样做的:

*我创建了一个新的navigationController,其根视图是我需要呈现的视图,并以模式呈现我的新navigationController**

moviePlayer = [[[CustomMoviePlayerViewController alloc] initWithPath:path1] autorelease];
navigationController1 = [[UINavigationController alloc] initWithRootViewController:moviePlayer];
[self.navigationController presentModalViewController:navigationController1 animated:YES];
这就是我的屏幕在展示新的navigationController之前的样子。

然后我会这样做:

[self.navigationController presentModalViewController:navigationController1 animated:YES];
给我的导航控制器的礼物

当我关闭navigationController时,我的屏幕如下所示:


我的页眉和页脚消失了。有什么解决办法吗?谢谢

我也有类似的问题,我所做的是,您可以在tabbar控制器上设置modalview控制器,而不是导航控制器

编辑
而不是[self.navigationController presentModalViewController:navigationController1 animated:YES];写入[tabBarController presentModalViewController:viewController动画:是]

请写一些代码来说明清楚。非常感谢。[tabBarController presentModalViewController:viewController动画:是];我这样做了[self.tabBarController presentModalViewController:moviePlayer animated:YES];但是什么都没有发生。知道为什么吗?我已经做了一些对我有效的事情,我想你必须检查你的代码为什么会发生这种情况,并相应地做。但我认为它应该工作,因为我继承了tabBarController……否则我就不应该拥有它:[self.navigationController presentModalViewController:navigationController 1.view动画:是];代替分配导航控制器分配其视图…如上所述..n检查