简体   繁体   English

UIInterfaceOrientation info.plist

[英]UIInterfaceOrientation info.plist

I am working on an iOS app using Adobe Air to package it. 我正在使用Adobe Air打包它的iOS应用程序。 I am trying to set the InterfaceOrientation to the info.plist. 我试图将InterfaceOrientation设置为info.plist。

So added UIInterfaceOrienation to my app.xml but it gives me "application.iPhone.InfoAdditions contains an invalid value" error when I try to create an iOS Package. 因此,在我尝试创建iOS程序包时,向我的app.xml中添加了UIInterfaceOrienation,但它给我“ application.iPhone.InfoAdditions包含无效值”错误。

This is what the app.xml looks like 这就是app.xml的样子

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

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

                ]]>
         </InfoAdditions>

Not too sure what I'm missing here. 不太确定我在这里缺少什么。 Any ideas? 有任何想法吗?

I don't think you will be able to do this via the air packager. 我认为您无法通过空气包装机完成此操作。

The closest you will be able to get imho is this 您能得到的最接近的恕我直言是这个

portrait false 假肖像

The solution you suggested will work in native development, but not (yet) using the air packager. 您建议的解决方案将在本机开发中使用,但尚未(使用空气打包机)使用。

I think you are going to be able to change it via code like this: stage.setOrientation( StageOrientation.ROTATED_LEFT ); 我认为您将能够通过如下代码进行更改:stage.setOrientation(StageOrientation.ROTATED_LEFT);

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM