【发布时间】:2012-02-15 10:25:26
【问题描述】:
我是第一次在 iPad 上工作,我注意到我无法在 iPad 上使用 UINavigationController,就像我目前在 iPhone 上使用的那样。
这就是我想要做的。
- 在 AppDelegate 中使用 UINavigationBarController
- 创建它的对象并连接它。
- 创建 UIViewController 类 + XIB
- 将此 XIB 设置为导航的根视图
对于 iPhone,它曾经可以工作,但对于 iPad,它不工作。我的 viewController 的 ViewDidLoad 方法没有被调用。
任何建议我该怎么做。
编辑:
在.m navigationController = [[UINavigationController alloc] initWithRootViewController:loginViewController];
[window addSubview:navigationController.view];
谢谢, 吉特什
【问题讨论】:
-
发布您的代码 appDelegate 代码
-
它应该是一样的。你可能犯了一个错误。因此,如果您希望我们能够提供帮助,请提供代码。
标签: iphone ipad uiviewcontroller uinavigationcontroller