我希望将 2 个导航控制器附加到一个选项卡栏项目。
基本上,这个想法是在单个选项卡项上有 2 个视图,并且应该有一个导航栏来推动和弹出屏幕。 (与 iPad 中的设置应用程序相同)。
已编辑======
看起来左侧有一个带有自己的导航控制器的视图,而右侧有另一个带有自己的导航控制器(或其他一些 UI)的视图来实现 Push Pop 功能。
我知道如何将 1 个导航控制器附加到一个选项卡栏项目。
针对 ModalView 问题进行了编辑:-
通过实施 conmulligan 代码,一切都可以正常工作。但是,如果我尝试在 lansdscape 模式下显示某些 ModalViewController,并且当我尝试关闭此 ModalView 时,FirstViewController 导航栏将变为纵向(及其视图),而 SecondViewController 导航栏仍保持横向(应该是)。这种情况仅发生在设备中,而不是模拟器中。
下面是我展示 ModalViewController 的代码。
ModalTableViewController *modalTableViewController = [[ModalTableViewController alloc]initWithNibName:@"ModalTableViewController" bundle:[NSBundle mainBundle]];
UINavigationController *localNavigationViewController = [[UINavigationController alloc] initWithRootViewController:modalTableViewController];
localNavigationViewController.modalPresentationStyle = UIModalPresentationFormSheet;
[self presentModalViewController:localNavigationViewController animated:YES];
[modalTableViewController release];
[localNavigationViewController release];
为了关闭 ModalViewCntroller 我这样做:-
[self dismissModalViewControllerAnimated:YES];
Waiting for your replies.![enter image description here](https://i.stack.imgur.com/OH54D.png)