我只加载了Phonegap和jQuery 2.0.0(其他解决方案涉及我没有使用的jQuery Mobile),我只针对iOS进行部署。 我已经加载了一个启动图片,然后应用程序显示一个白屏(持续时间不定 - 我猜它正在加载应用程序?),然后我的index.html加载我的第一个屏幕。 这是我的当前头部:
<head>
<meta charset="utf-8" />
<meta name="format-detection" content="telephone=no" />
<meta name="viewport" content="user-scalable=no, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />
<link type="text/css" rel="stylesheet" href="css/main.css" />
<title>My App</title>
<script type="text/javascript" src="phonegap.js"></script>
<script src="js/lib/jquery-2.0.0.min.js"></script>
<script src="js/main.js"></script>
</head>
我尝试将以下内容添加到我的config.xml文件中(与index.html在同一级别的文件夹中):
<preference name="backgroundColor" value="0x000000" />
但我仍然看到白屏闪烁。我还尝试了手动隐藏/显示启动画面:
function onDeviceReady() {
navigator.splashscreen.show();
}
但似乎这并没有任何影响。有人有什么建议吗?