强制在iPhone的画象取向与phonegap [英] Force portrait orientation on iPhone with phonegap

查看:107
本文介绍了强制在iPhone的画象取向与phonegap的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要为我的应用程式设定纵向,我尝试使用:



AndroidManifest.xml:

 < activity ... android:screenOrientation =portrait... android:configChanges =orientation | .../> 


config.xml:

 < preference name =orientationvalue =portrait/> 

在我的Android手机上可以正常工作,但不能在iPhone 4上。



感谢!

解决方案

打开'ProjectName'-info.plist



在支持的界面方向数组中,仅支持肖像模式。

this-



>



,那么您的phonegap应用程序只能在iPhone上的Portait模式下运行。


I want portrait orientation for my application, I tryed with:

AndroidManifest.xml:

<activity ... android:screenOrientation="portrait" ... android:configChanges="orientation| ..." />

and config.xml:

<preference name="orientation" value="portrait" />

That works perfectly on my android phone, but not on iPhone 4.

Thanks!

解决方案

Open 'ProjectName'-info.plist file in Xcode.

In 'Supported interface orientations' array, keep support for Portrait mode only.

Like this-

then your phonegap app will run only in Portait Mode on iPhone.

这篇关于强制在iPhone的画象取向与phonegap的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆