【问题标题】:iPad orientation portrait only仅 iPad 方向纵向
【发布时间】:2013-03-02 13:13:45
【问题描述】:

我将 Project Summary > iPhone / iPod Deployment Info > Supported Interface Orientations 设置为仅纵向模式。

这适用于所有模拟器、iPad(iOS 5.1) 和 iPhone(iOS 6.1)。

但是在我将 iPad 上的 iOS 从 5.1 升级到 6.1.2 之后

在 iPad 上运行的应用程序在应用程序启动时变为横向(左+右)模式。

我该如何解决这个问题?

【问题讨论】:

    标签: xcode ipad orientation project-settings


    【解决方案1】:

    将 UISupportedInterfaceOrientation 添加到您的 info.plist 中,并为您支持的每个方向设置一个设置。

    【讨论】:

    • 应该是UISupportedInterfaceOrientations
    【解决方案2】:

    尝试转到 Supporting Files 中的 YourApp-Info.plist 文件,并确保为 Supported interface orientations 和 Supported interface orientations (iPad) 设置了正确的方向

    【讨论】:

    • 在将纵向添加到支持的界面方向之后。我收到错误“UIApplicationInvalidInterfaceOrientation”,原因:“支持的方向与应用程序没有共同的方向,并且 shouldAutorotate 返回 YES”
    • 猜你错过了-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation?但你似乎让它工作了:) 很高兴能提供帮助
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-11-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-04-01
    相关资源
    最近更新 更多