2014-02-17 173 views
1

我覺得cordova/phonegap文檔非常混亂,特別是與ios有關。科爾多瓦/ phonegap文檔混淆

例如:在http://cordova.apache.org/docs/en/3.3.0/config_ref_index.md.html 它說:

Orientation allows you to lock orientation and prevent the interface from rotating in response to changes in orientation. 

可能的值是默認的,景觀,或縱向。例如:

<preference name="Orientation" value="landscape" /> 

其不工作。

另外,我發現的插件都沒有通過編譯(主要是缺少文件問題)。

我有一種感覺,這是一個版本控制的問題,但沒有一篇文章提到任何有關它的事情。

所以我的問題:

  1. 如何鎖定方向是什麼?

  2. 如何找到正確的文檔? 例如我提供的鏈接具有'3.3.0',我猜的意思是版本,但是我找不到v2中config xml的文檔。

+0

Cordova 2.x中沒有'config.xml',爲什麼不更新到3.x?由於cli工具的使用,它更容易使用。 – jgillich

+0

3.x dosent在紋波上工作,對我來說phonegap是無用的,如果我無法在大調查中調試,我該如何調試3.x? –

+0

如果您從npm安裝最新版本的Ripple,它支持Cordova 3.x. 看看這裏(http://www.raymondcamden.com/index.cfm/2013/11/5/Ripple-is-Reborn),瞭解如何通過npm安裝它。 – Kastell

回答

0

在3.3 - IOS - 鎖定方位在* -info.plist通過設置來完成:

<key>UISupportedInterfaceOrientations~ipad</key> 
<array> 
    <string>UIInterfaceOrientationPortrait</string> 
</array> 

注:從默認生成的plist你應該刪除不必要的值。