0

我需要在我的根目录中显示一个UINavigationController, 。如果那不可能,我想知道如何拆分窗口并在其中显示 2 s。我需要像 Facebook 应用程序这样的东西,但在垂直方向上,像这样:TableViewUIViewControllerViewController

| NavigationController|
|                     |
|                     |
|                     |
|                     |
|---------------------|
|                     |
| root ViewController |

谢谢!

4

1 回答 1

0

是的先生,您可以这样做...假设您有一个视图控制器,其中有一个 tableView 即 tableViewController
比您可以像创建它一样...

TableViewController *tableViewController = [[[TableViewController alloc] initWithNibName:nil bundle:nil] autorelease];
UINavigationController *navigationController =
[[UINavigationController alloc] initWithRootViewController:tableViewController];
[self.view addSubview:navigationController.view];
[navigationController release];

您只需要指定 subViewController 的大小和位置,使其适合正确的位置。希望这会有所帮助。

于 2012-04-07T22:52:03.340 回答