我的iPhone 5s无法使用钛合金进行水平旋转
My iPhone 5s is not working with horizontal rotation using Titanium Alloy
我的应用程序可以在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仍然不能水平旋转。它保持垂直,就像在水平模式下一样。
相关文章:
- 避免在钛合金加速器中暂停应用程序
- 如何从“;“必需”;钛合金模块
- 如何删除使用钛合金框架
- MVC和钛合金,结构
- 钛合金未来的日子和时间倒计时
- 如何在钛(合金)图像视图中使用后置布局
- 钛合金布局
- 从钛合金中的选取器获取所选行
- 如何读取钛合金中的当地国家/地区电话代码xml
- 在钛合金调音器中设置视图和文本视图的 ID
- 钛合金JavaScript执行
- 关闭窗户并打开新窗口钛合金
- 我的iPhone 5s无法使用钛合金进行水平旋转
- 钛合金中的Android定向
- 钛合金开口标签组存在问题
- 打开和关闭钛合金窗户的正确方式
- 关闭模式并滚动到钛合金中的视图
- 如何在钛合金中隐藏/显示文本字段
- 如何将中的数据绑定到钛合金中的标签
- 钛合金背面活性