【发布时间】:2011-07-22 17:17:07
【问题描述】:
我使用 phonegap 库 (Phonegap 0.9.6) 为 iPhone 制作了一个简单的应用程序。我喜欢使用方向功能,但如果我旋转设备,屏幕不会改变。
我尝试了几件事,但都没有奏效。
我将这些行添加到_Info.plist:
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
接下来尝试将这些相同的行添加到PhoneGap.plist。
我尝试使用 javascript,但不工作。有人知道解决方案吗?
【问题讨论】:
-
据我从 PhoneGap 文档中得知,orientationChanged 不受支持。我以前见过提到它,但可能在 1.0 中被删除了