【问题标题】:DetailView not loading in SplitViewControllerDetailView 未在 SplitViewController 中加载
【发布时间】:2011-05-06 01:53:43
【问题描述】:

我在 TabBarApplication 中使用 SplitViewController 进行管理。 现在的问题是,尝试在横向模式下启动应用程序(SplitViewController 是我的 TabbarApp 中的第一个视图),详细视图未加载。以纵向启动它可以正常工作,在以纵向启动后将我的 iPad 推到横向后也是如此。

这里有 2 个链接:

Starting in Portrait, switching to Landscape

Starting in Landscape

我已经修改了willShowViewController 方法,因为我什至无法在横向启动它

- (void)splitViewController: (UISplitViewController*)svc willShowViewController:(UIViewController *)aViewController invalidatingBarButtonItem:(UIBarButtonItem *)barButtonItem {

    NSMutableArray *items = [[toolbar items] mutableCopy];
    //XLog("second: %i",[items count]);
    if([items count] > 0) {
        [items removeObjectAtIndex:0];
        [toolbar setItems:items animated:YES];
    }
    [items release];
    self.popoverController = nil;

}

if 查询防止我的应用在横向崩溃。

我不知道为什么我的 detailviewcontroller 没有显示,而我的 splitview 的 rootviewcontroller 显示在整个宽度上。

有什么想法吗?

谢谢!

【问题讨论】:

    标签: iphone objective-c ipad ios uisplitviewcontroller


    【解决方案1】:

    特别是在 iOS 4.2 中,我认为这是一个错误。 我找到了解决方法并在这里写了:

    How to restrict my app to landscape mode?

    希望对你有帮助

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-07-25
      • 2012-06-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多