【问题标题】:UIInterfaceOrientation info.plistUIInterfaceOrientation info.plist
【发布时间】:2012-11-28 14:26:33
【问题描述】:

我正在开发一个使用 Adob​​e Air 打包的 iOS 应用程序。 我正在尝试将 InterfaceOrientation 设置为 info.plist。

所以在我的 app.xml 中添加了 UIInterfaceOrienation,但是当我尝试创建 iOS 包时,它给了我“application.iPhone.InfoAdditions contains an invalid value”错误。

这就是 app.xml 的样子

<iPhone>
    <InfoAdditions>
        <![CDATA[
                          ...... other values

                           <key>UIInterfaceOrientation</key>
                           <string>UIInterfaceOrientationLandscapeRight</string>

                ]]>
         </InfoAdditions>

不太清楚我在这里缺少什么。 有什么想法吗?

【问题讨论】:

    标签: ios air


    【解决方案1】:

    我认为您无法通过航空包装器执行此操作。

    你能得到的最接近恕我直言的是这个

    肖像 假的

    您建议的解决方案将适用于本机开发,但(尚未)使用 air packager。

    我认为您将能够通过如下代码更改它:stage.setOrientation(StageOrientation.ROTATED_LEFT);

    来源:http://polygeek.com/4301_air-mobile_playing-with-stage-orientation-in-mobile-air-apps

    【讨论】:

    • 仍然有同样的错误。但是,不确定它现在是如何工作的。我想要做的是将横向设置为“正面朝上”,即当您旋转手机时音量按钮位于手机顶部。默认值似乎是“颠倒的”。
    • 将我的答案更改为更适合您情况的答案
    • 成功了!谢谢 :) contextView.stage.autoOrients = false; contextView.stage.setOrientation(StageOrientation.ROTATED_LEFT); contextView.stage.setOrientation(StageAspectRatio.LANDSCAPE); 注意,ROTATED_LEFT 使它“正面朝上”
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-04-22
    • 2012-02-02
    • 1970-01-01
    相关资源
    最近更新 更多