PDA

View Full Version : iPad with iOS 4.2.1 - how to get apple-touch-startup-image to work in landscape mode.



sandor
21 Dec 2010, 1:17 AM
Before the update, I was able to display an image using the apple-touch-startup-image link tag (the image had to be exactly 768x1004 - even if the iPad was in landscape mode).  Now, when loading my web app in landscape mode, I get a white screen - my image does not display.  In portrait mode, though, it still displays correctly.

This suggestion from the apple developer forums does not working for me:

<link rel="apple-touch-startup-image" media="screen and (orientation: landscape)" href="<startupImage file>">
<link rel="apple-touch-startup-image" media="screen and (orientation: portrait)" href="<startupImage file>">
 
I've tried all the logical permutations of the dimensions of the image, but nothing.  Does someone know how to get this to work?
thanks in advance.

derickito
20 May 2011, 1:57 PM
I got the solution here: https://gist.github.com/472519


<!-- startup image for web apps - iPad - landscape (1024x748) -->
<link rel="apple-touch-startup-image" href="/customIcon.png" media="screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation:landscape)" />

<!-- startup image for web apps - iPad - portrait (768x1024) -->
<link rel="apple-touch-startup-image" href="/customIcon.png" media="screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation:portrait)" />

You have to use the meta tags above and the landscape image dimensions have to be 748x1024 (A landscape image rotated 90 degrees clockwise). Also the app has to be launched at least once in portrait mode first in order for the landscape image to show up.

Hope that works for you.

harshadpatil
19 Jun 2012, 6:06 AM
Hi.. Budy

I'm using iwebkit framekwork for developing Iphone web apps but problem is .....
in all iphones ..startup image is working using this code
<link rel="apple-touch-startup-image" href="pics/startup.png">
But is won't work in I-pad 2 whats the problem please help me in this........
and also i ahave used ur code ....

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


<!-- startup image for web apps - iPad - portrait (768x1004) -->
<link rel="apple-touch-startup-image" href="pics/ipad-portrait.png" media="screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation:portrait)" />


<!-- startup image for web apps (320x460) -->
<link rel="apple-touch-startup-image" href="pics/startup.png" media="screen and (max-device-width: 320px)" />

Then also it is not working.......

Thanks