【问题标题】:iPad: Presenting UIImagePickerController in landscape rotates my other view controllers on dismissiPad:在横向呈现 UIImagePickerController 会在关闭时旋转我的其他视图控制器
【发布时间】:2013-01-14 00:38:06
【问题描述】:

我在 iPad 上用UIImagePickerControllerSourceTypeCamera 呈现UIImagePickerController。我知道其他UIImagePickerControllerSourceType 选项需要在UIPopoverController 中显示,但我怀疑相机应该是。

话虽如此,我正在从模态视图控制器呈现相机,该控制器呈现为formSheet。有时当我展示选择器时,它会向下移动几个像素,就像状态栏将其向下推:

接下来,当我关闭选择器时,它已将我的 formSheet 模式旋转到纵向模式,但底层 UISplitViewController 仍处于横向模式:

这里发生了什么?从模态表单显示UIImagePickerController 时我做错了什么吗?

【问题讨论】:

    标签: ios objective-c ipad uiimagepickercontroller uimodalpresentationstyle


    【解决方案1】:

    我发现了问题所在。我的UINavigationController 子类中有以下内容:

    // Tell the system which initial orientation we want to have
    - (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation {
        return UIInterfaceOrientationPortrait;
    }
    

    删除解决了问题!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-11-15
      • 2013-01-12
      • 2013-11-20
      • 1970-01-01
      • 2012-10-11
      • 2012-03-16
      • 1970-01-01
      相关资源
      最近更新 更多