Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/40.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Iphone apple touch启动图像加载分辨率错误的图像_Iphone_Sencha Touch_Resolution_Splash Screen - Fatal编程技术网

Iphone apple touch启动图像加载分辨率错误的图像

Iphone apple touch启动图像加载分辨率错误的图像,iphone,sencha-touch,resolution,splash-screen,Iphone,Sencha Touch,Resolution,Splash Screen,我正在做一个Sencha Touch web应用程序,其启动屏幕如下所示。图像分别为640x920和320x460(允许使用状态栏并遵循Sencha的示例) 然而,在iPhone4上,我仍然只能看到低分辨率的图像。(为了方便起见,我在适当的图像中嵌入了文本“640x920”和“320x460”,以确保我看到的是正确的图像。) 我一直在清除Safari缓存并重新加载应用程序,但错误的图像继续加载 为了确保它们是正确的,我切换了链接指向相反的文件,但正如预期的那样,两个splash都没有加载 还

我正在做一个Sencha Touch web应用程序,其启动屏幕如下所示。图像分别为640x920和320x460(允许使用状态栏并遵循Sencha的示例)


然而,在iPhone4上,我仍然只能看到低分辨率的图像。(为了方便起见,我在适当的图像中嵌入了文本“640x920”和“320x460”,以确保我看到的是正确的图像。)

我一直在清除Safari缓存并重新加载应用程序,但错误的图像继续加载

为了确保它们是正确的,我切换了链接指向相反的文件,但正如预期的那样,两个splash都没有加载

还有其他建议吗

编辑:
同样,预合成的苹果触摸图标也加载了两者中较小的一个。

此时,苹果似乎不支持视网膜显示分辨率启动图像。根据他们的

在iPhone和iPodtouch上,图像必须为320 x 460像素,且以英寸为单位 纵向定位

那篇文章中没有提到支持高分辨率启动映像


关于这个问题的另一个很好的讨论可以找到。

缺少文档肯定令人沮丧。我找到了一个解决方案,并在这里写了一篇博客:


基本上,“大小”属性和媒体查询将不起作用。加载页面后,必须通过JavaScript注入高分辨率启动图像。这会为你的Web应用程序添加一个启动屏幕。以下是iPad和iPhone/iPodtouch所需的尺寸,包括状态栏区域

<!-- iPhone -->
<link href="http://www.example.com/mobile/images/apple-startup-iPhone.jpg" media="(device-width: 320px) and (device-height: 480px) and (-webkit-device-pixel-ratio: 1)" rel="apple-touch-startup-image">

<!-- iPhone (Retina) -->
<link href="http://www.example.com/mobile/images/apple-startup-iPhone-RETINA.jpg" media="(device-width: 320px) and (device-height: 480px) and (-webkit-device-pixel-ratio: 2)" rel="apple-touch-startup-image">

<!-- iPhone 5 -->
<link href="http://www.example.com/mobile/images/apple-startup-iPhone-Tall-RETINA.jpg"  media="(device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2)" rel="apple-touch-startup-image">

<!-- iPad Portrait -->
<link href="http://www.example.com/mobile/images/apple-startup-iPad-Portrait.jpg" media="(device-width: 768px) and (device-height: 1024px) and (orientation: portrait) and (-webkit-device-pixel-ratio: 1)" rel="apple-touch-startup-image">

<!-- iPad Landscape -->
<link href="http://www.example.com/mobile/images/apple-startup-iPad-Landscape.jpg" media="(device-width: 768px) and (device-height: 1024px) and (orientation: landscape) and (-webkit-device-pixel-ratio: 1)" rel="apple-touch-startup-image">

<!-- iPad Portrait (Retina) -->
<link href="http://www.example.com/mobile/images/apple-startup-iPad-RETINA-Portrait.jpg" media="(device-width: 768px) and (device-height: 1024px) and (orientation: portrait) and (-webkit-device-pixel-ratio: 2)" rel="apple-touch-startup-image">

<!-- iPad Landscape (Retina) -->
<link href="http://www.example.com/mobile/images/apple-startup-iPad-RETINA-Landscape.jpg" media="(device-width: 768px) and (device-height: 1024px) and (orientation: landscape) and (-webkit-device-pixel-ratio: 2)" rel="apple-touch-startup-image">


如果创建一个与iPad兼容的Web应用程序,建议同时使用横向和纵向尺寸。

我尝试过各种方法,但iPad 2无法识别尺寸属性,模拟器也无法识别。上面的代码来自我的Web应用程序。。。我没有任何问题。我会100%确定您的图像大小准确无误,并在文档的
中插入上面的代码,就在元标记之后。我已经读到一些地方的图像必须是一个jpg,虽然我没有看到这一点。
<!-- iPhone -->
<link href="http://www.example.com/mobile/images/apple-startup-iPhone.jpg" media="(device-width: 320px) and (device-height: 480px) and (-webkit-device-pixel-ratio: 1)" rel="apple-touch-startup-image">

<!-- iPhone (Retina) -->
<link href="http://www.example.com/mobile/images/apple-startup-iPhone-RETINA.jpg" media="(device-width: 320px) and (device-height: 480px) and (-webkit-device-pixel-ratio: 2)" rel="apple-touch-startup-image">

<!-- iPhone 5 -->
<link href="http://www.example.com/mobile/images/apple-startup-iPhone-Tall-RETINA.jpg"  media="(device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2)" rel="apple-touch-startup-image">

<!-- iPad Portrait -->
<link href="http://www.example.com/mobile/images/apple-startup-iPad-Portrait.jpg" media="(device-width: 768px) and (device-height: 1024px) and (orientation: portrait) and (-webkit-device-pixel-ratio: 1)" rel="apple-touch-startup-image">

<!-- iPad Landscape -->
<link href="http://www.example.com/mobile/images/apple-startup-iPad-Landscape.jpg" media="(device-width: 768px) and (device-height: 1024px) and (orientation: landscape) and (-webkit-device-pixel-ratio: 1)" rel="apple-touch-startup-image">

<!-- iPad Portrait (Retina) -->
<link href="http://www.example.com/mobile/images/apple-startup-iPad-RETINA-Portrait.jpg" media="(device-width: 768px) and (device-height: 1024px) and (orientation: portrait) and (-webkit-device-pixel-ratio: 2)" rel="apple-touch-startup-image">

<!-- iPad Landscape (Retina) -->
<link href="http://www.example.com/mobile/images/apple-startup-iPad-RETINA-Landscape.jpg" media="(device-width: 768px) and (device-height: 1024px) and (orientation: landscape) and (-webkit-device-pixel-ratio: 2)" rel="apple-touch-startup-image">