2017-01-17 111 views
0

所以我正在开发一个在Intel XDK上的应用程序。无论手持设备的方式如何,此应用都需要屏幕方向保持纵向。我搜索了很多次,没有发现应用程序。如果你可以请告诉我如何做到这一点,将不胜感激。谢谢。如何在iOS应用程序中锁定屏幕方向?

回答

0

使用setRotateOrientation方法或选择使用的科尔多瓦 - 插件屏幕方位用主

intel.xdk.device.setRotateOrientation("portrait"); 
+0

凡在我的代码,我会把这个? (html,css等) –

+0

你必须创建一个函数'OnDeviceReady(){intel.xdk.device.setRotateOrientation(“portrait”);}'然后添加一个事件监听器'document.addEventListener(“intel。 “' – Naz

+0

所以,我做这在我的代码之间放置你的HTML中.setRotateOrientation(“portrait”);} document.addEventListener(“intel.xdk.device.ready”,onDeviceReady,false); ' –