0

由于一些布局限制,我的应用程序只能在横向模式下运行。自 IOS7 更新以来,每当我在 phonegap 应用程序上拍照时,屏幕的右侧就会消失(好像方向变为纵向),并且我的右侧会出现一个黑条。

如果我将 ipad 旋转 180˚,它会自行重置并再次正常显示,但我的客户不会接受这个作为解决方案!

任何想法为什么会发生?或者我如何以编程方式改变方向?

4

1 回答 1

0

I had a similar problem with the black bar on right side. My problem occurred when the orientation changed, not from the camera. For me the solution was to change the viewport meta tag in index.html to:

<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, target-densitydpi=device-dpi" />

For anyone doing any digging, I found that the webView was resizing correctly, and the black bar was from the webView not re-rendering its content at the correct size.

于 2013-10-18T00:13:56.763 回答