【问题标题】:LandScape Orientation Issue while presenting UIImagePickerController in iPad在 iPad 中呈现 UIImagePickerController 时出现景观方向问题
【发布时间】:2023-03-12 12:18:01
【问题描述】:

在横向模式下呈现 UIImagePickerController 时,它会旋转到纵向模式而不是横向模式。我在 iPad 中遇到了这个问题,但在模拟器中它工作正常。有人可以帮忙吗?

【问题讨论】:

    标签: ios objective-c orientation uiimagepickercontroller


    【解决方案1】:

    尝试像这样使用:

    -(NSUInteger)supportedInterfaceOrientations
    {
       return UIInterfaceOrientationMaskLandscape;
    }
    

    【讨论】:

    • 获取冲突的返回类型作为警告
    • 然后简单地使用 - (UIInterfaceOrientationMask)supportedInterfaceOrientations
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-10-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-03-14
    相关资源
    最近更新 更多