我正在制作一个 Sencha Touch Web 应用程序,其启动画面指定如下。图像分别为 640x920 和 320x460(允许状态栏并遵循 Sencha 的示例)。
<link rel="apple-touch-startup-image" media="screen and (resolution: 326dpi)" href="/resources/img/startup_640.png" />
<link rel="apple-touch-startup-image" media="screen and (resolution: 163dpi)" href="/resources/img/startup.png" />
然而,在 iPhone 4 上,我仍然只能看到低分辨率图像。 (为了简单起见,我在适当的图像中嵌入了文本“640x920”和“320x460”,以确保我看到的是正确的图像。)
我不断清除 Safari 缓存并重新加载应用程序,但错误图像继续加载。
为了确保它们是正确的,我将链接切换为指向相反的文件,但随后正如预期的那样,两个启动画面都没有加载。
还有其他建议吗?
编辑:
同样,apple-touch-icon-precomposed 也会加载两者中较小的一个。
I'm doing a Sencha Touch web app with splash screens specified as follows. The images are 640x920 and 320x460 respectively (allowing for the statusbar and following an example from Sencha).
<link rel="apple-touch-startup-image" media="screen and (resolution: 326dpi)" href="/resources/img/startup_640.png" />
<link rel="apple-touch-startup-image" media="screen and (resolution: 163dpi)" href="/resources/img/startup.png" />
However, on an iPhone 4, I'm still seeing only the low resolution image. (To make things easy, I've embedded the text "640x920" and "320x460" in the appropriate image to be sure I'm looking at the right images.)
I keep clearing the Safari cache and reloading the app, but the wrong image continues to load.
Just to make sure I had them right, I switched the links to point to the opposite files, but then as expected, neither splash loaded.
Any other suggestions?
EDIT:
Similarly, the apple-touch-icon-precomposed
is loading the smaller of the two as well.
发布评论
评论(3)
这将为您的 Web 应用程序添加一个启动屏幕。以下是 iPad 和 iPhone/iPod Touch 所需的尺寸,其中也包括状态栏区域。
如果创建与 iPad 兼容的 Web 应用程序,建议同时使用横向和纵向尺寸。
This will add a Splash Screen to your Web App. Below are the sizes you’ll need for both iPad and iPhone/iPod Touch, these include the status bar area as well.
If creating a Web App for iPad compatibility it’s recommended that both Landscape and Portrait sizes are used.
缺乏文档确实令人沮丧。我找到了一个解决方案并在此处发布了有关它的博客: http://paulofierro.com/blog/2011/8/31/icons-and-splash-screens-for-ios-web-apps-retina-displays-also-welcome
基本上大小属性和媒体查询将不起作用。页面加载后,您必须通过 JavaScript 注入高分辨率启动图像。哈克但有效。
The lack of documentation certainly is frustrating. I found a solution and blogged about it here: http://paulofierro.com/blog/2011/8/31/icons-and-splash-screens-for-ios-web-apps-retina-displays-also-welcome
Basically the sizes property and media queries will not work. You have to inject the high-res startup image via JavaScript once your page is loaded. Hacky but works.
目前看来,苹果不支持视网膜显示分辨率的启动图像。根据他们的文档.. 。
那篇文章中没有提及支持高分辨率启动图像。
关于此问题的另一个很好的讨论可以在此处找到。
It seems at this point in time, Apple does not support a retina display resolution startup image. According to their docs...
Nothing is stated in that article about supporting high-res startup images.
Another good discussion of this issue can be found here.