Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Startup image in webapp for Retina display?

Anybody know how to get iOS to display higher resolution startup image when using ? Currently I'm stuck with 460x380 image which obviously looks horrible when displayed on iPhone 4's high dpi display. I tried the @2x trick but didn't seem to work.

Any ideas or workarounds?

like image 660
Crispy Avatar asked Sep 14 '10 09:09

Crispy


2 Answers

I didn't ever think I would get this working, but for some reason, everywhere online states that the hi-res images dimensions are 640x960, they are actually 640x920. When you make this change, the hi-res splash screen will appear correctly on retina displays. Below is the exact code that I use in our app. We have splash screens working on iPad1/iPad2 Portrait and Landscape, iPhone3/iPhone4

Hope this helps someone.

  <!-- iOS Device Startup Images -->
<!-- iPhone/iPod Touch Portrait – 320 x 460 (standard resolution) -->
<link rel="apple-touch-startup-image" href="splash-screen-320x460.png" media="screen and (max-device-width: 320px)" />

<!-- iPhone/iPod Touch Portrait – 640 x 920 pixels (high-resolution) -->
<link rel="apple-touch-startup-image" media="(max-device-width: 480px) and (-webkit-min-device-pixel-ratio: 2)" href="splash-screen-640x920.png" />

<!-- For iPad Landscape 1024x748 -->
  <!-- Note: iPad landscape startup image has to be exactly 748x1024 pixels (portrait, with contents rotated).-->
<link rel="apple-touch-startup-image" sizes="1024x748" href="splash-screen-1024x748.png" media="screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation:landscape)" />

<!-- For iPad Portrait 768x1004 -->
<link rel="apple-touch-startup-image" sizes="768x1004" href="splash-screen-768x1004.png" media="screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation:portrait)"/>
like image 97
dnadeau Avatar answered Oct 24 '22 04:10

dnadeau


Have you tried using media queries related to pixel ratio on the link tag?

media="only screen and (-webkit-min-device-pixel-ratio: 2)" for the retina display one.

like image 1
Ian Storm Taylor Avatar answered Oct 24 '22 03:10

Ian Storm Taylor