【问题标题】:SplitView Controller portrait mode- Top button keeps shifting to rightSplitView 控制器纵向模式 - 顶部按钮不断向右移动
【发布时间】:2010-05-17 07:26:47
【问题描述】:

我在 ipad 中使用 SplitViewController。在详细视图中单击按钮时,我会打开一个处于全屏模式的模态视图。每当我关闭模态视图时,以纵向模式显示表格视图的按钮就会向右移动。

如果我继续打开模态视图并将其关闭,它会一直向右移动,直到消失到屏幕右侧。

知道为什么会这样吗?

【问题讨论】:

  • 顺便说一句。这发生在模拟器上。我还没有在设备上进行测试。
  • 这也发生在设备上。此外,用于纵向模式的条形按钮也会出现在横向模式下。

标签: iphone ipad uisplitviewcontroller


【解决方案1】:

当any.modalPresentationStyle = UIModalPresentationFullScreen;时出现问题

我把它改成了 any.modalPresentationStyle = UIModalPresentationPageSheet;现在一切都很好。

【讨论】:

    【解决方案2】:

    我确认将 modalPresentationStyle 更改为 UIModalPresentationPageSheet 可以解决问题 例如:

    MY_VC *controller = [[MY_VC alloc] initWithNibName:@"MY_VC" bundle:nil];
    [controller setModalPresentationStyle:UIModalPresentationPageSheet];
    [splitViewController presentModalViewController:controller animated:NO];
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-05-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多