0

在 IOS 3.2 中,我能够像在横向模式下一样并排显示我的 UISplitViewController。

在 IOS 4.2 中,RootViewController (MasterView) 未以纵向模式显示。有谁知道我们是否需要在弹出窗口中显示 rootviewcontroll?我们可以像在横向模式下一样并排显示它吗?

我想避免必须单击按钮来显示主视图(在纵向模式下)

4

3 回答 3

0

在这种情况下,您可以跳过 splitviewcontroller 并仅创建可以手动控制 UI 的视图基础应用程序。

于 2010-12-20T11:29:08.267 回答
-1

我使用了 setHidesMasterViewInPortrait:NO,它在 5.0 之前的版本中确实有效,甚至进入了苹果商店一次。但是下次我更新应用程序时,他们拒绝了它,因为我使用了隐藏的 API。我仍在寻找一种方法来完成这项工作。

于 2012-08-03T13:59:49.170 回答
-1
  1. 在 viewDidAppear 你可以做

    [splitViewController setHidesMasterViewInPortrait:NO];

即使您收到警告,它也可以工作。我认为您可以使用自定义 splitviewcontroller 创建类别来消除警告。

2.否则你可以做类似的事情

在 viewWillAppear 上,您可以执行类似的操作

if (self.interfaceOrientation == UIInterfaceOrientationPortrait || self.interfaceOrientation == UIInterfaceOrientationPortraitUpsideDown) {
    UIViewController *master = [[splitViewController.viewControllers objectAtIndex:0];
    UIViewController *detail = [[splitViewController.viewControllers objectAtIndex:1];
    [splitViewController setupPortraitMode:master detail:detail];

}

(setupPortraitMode) http://intensedebate.com/profiles/fgrios

于 2011-01-12T20:37:56.033 回答