简体   繁体   English

Phonegap屏幕在Retina iPad Simulator上被切断

[英]Phonegap screen gets cut off on Retina iPad Simulator

在此处输入图片说明 I have a Phonegap App which uses jQueryMobile 1.3.2 and Phonegap 3.1 (with the status bar plugin). 我有一个使用jQueryMobile 1.3.2和Phonegap 3.1(带有状态栏插件)的Phonegap应用程序。 Everything works fine but the iPad Retina simulator (iOS 7) shows my screen cut off at the right hand side of the screen ( iPhone Retina is fine, as are all Android layouts). 一切正常,但是iPad Retina模拟器(iOS 7)在屏幕的右侧显示了我的屏幕( iPhone Retina很好,所有Android布局也一样)。

I'm using: 我正在使用:

<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no" >

...and tried with both EnableViewportScale true/false - whereas it has no effect besides the Retina 64bit - where a true will completely distort the view (I only see a green/white block), and also: ...并尝试对EnableViewportScale true / false进行尝试-而对Retina 64位则无效-在true时,true将完全扭曲视图(我只看到绿色/白色块),并且:

html, body { width: 100%; margin: 0; padding: 0; }

in my html pages. 在我的HTML页面中。 I have read through a few issues that iOS will return a different resolution value when "being retina", but never found anything in regards to fixing this related to phonegap. 我已经阅读了几个问题,iOS在“成为视网膜”时将返回不同的分辨率值,但从未发现任何有关解决与电话间隙有关的问题。

The strange thing is, when I put set eg width=400 in the viewport meta tag, nothing changes... again, independent from the EnableViewportScale setting. 奇怪的是,当我将例如width = 400的设置放到视口meta标签中时,没有任何变化……独立于EnableViewportScale设置。

Thanks in advance for any clues... 预先感谢您提供任何线索...

尝试这个 -

<meta name="viewport" content="user-scalable=no, initial-scale=1, minimum-scale=1, width=device-width" />

The main issue was the StatusBar plugin I used, which caused the weird layout. 主要问题是我使用的StatusBar插件,这导致了奇怪的布局。 After removing it, the layout was fine again. 删除后,布局再次正常。

As to the status bar - I don't really need to control it during the app so I did the following: Open the plist file (Resources/{ProjectName}-Info.plist) and add the key "View controller-based status bar appearance", set it to "NO". 关于状态栏-我在应用程序期间实际上不需要控制它,因此我执行了以下操作:打开plist文件(Resources / {ProjectName} -Info.plist),然后添加键“基于视图控制器的状态栏”外观”,将其设置为“否”。 Also create the key / make sure that "Status bar is initially hidden" is set to "YES". 还要创建密钥/确保“状态栏最初处于隐藏状态”设置为“是”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM