我的iPhone 5s无法使用钛合金进行水平旋转

My iPhone 5s is not working with horizontal rotation using Titanium Alloy

本文关键字:钛合金 水平 旋转 iPhone 5s 我的      更新时间:2023-09-26

我的应用程序可以在Android和iPad设备中进行所有旋转,但我的新iPhone 5s不能进行水平旋转。当iPhone水平旋转时,它保持垂直。为此,我已经在Tiapp.xml文件中添加了以下代码:

<orientations device="iphone">
            <orientation>Ti.UI.PORTRAIT</orientation>
            <orientation>Ti.UI.UPSIDE_PORTRAIT</orientation>
            <orientation>Ti.UI.LANDSCAPE_LEFT</orientation>
            <orientation>Ti.UI.LANDSCAPE_RIGHT</orientation>
</orientations>

此外,我按照本https://support.apple.com/en-us/HT204547链接,但它在我的新iPhone 中不起作用

您使用的配置方法已被弃用,可能已被删除很长一段时间。您可以在以下指南中找到限制定向模式的当前方法:

http://docs.appcelerator.com/platform/latest/#/guide/Orientation-section-29004932_Orientation-LimitingorientationonDesoniOS

<ios>
        <plist>
            <dict>
                <key>UISupportedInterfaceOrientations~iphone</key>
                <array>
                    <string>UIInterfaceOrientationPortrait</string>
                  <string>UIInterfaceOrientationPortraitUpsideDown</string>
                    <string>UIInterfaceOrientationLandscapeLeft</string>
                    <string>UIInterfaceOrientationLandscapeRight</string>
                </array>
                <key>UISupportedInterfaceOrientations~ipad</key>
                <array>
                    <string>UIInterfaceOrientationPortrait</string>
                  <string>UIInterfaceOrientationPortraitUpsideDown</string>
                    <string>UIInterfaceOrientationLandscapeLeft</string>
                    <string>UIInterfaceOrientationLandscapeRight</string>
                </array>
            </dict>
        </plist>
    </ios>

使用上面的代码&请确保打开iPhone中的旋转功能。

这是我的代码,我把它放在<ios>内的Tiapp.xml文件中。。</IOS>

<ios>
        <plist>
            <dict>
                <key>UISupportedInterfaceOrientations~iphone</key>
                <array>
                    <string>UIInterfaceOrientationPortrait</string>
                </array>
                <key>UISupportedInterfaceOrientations~ipad</key>
                <array>
                    <string>UIInterfaceOrientationPortrait</string>
                    <string>UIInterfaceOrientationPortraitUpsideDown</string>
                    <string>UIInterfaceOrientationLandscapeLeft</string>
                    <string>UIInterfaceOrientationLandscapeRight</string>
                </array>
            </dict>
        </plist>
    </ios>

这合适吗
在把这个放在Tiapp.xml中之后,我的iphone5-s仍然不能水平旋转。它保持垂直,就像在水平模式下一样。