7

I am developing a game which works only in landscape mode. When I import a launch image (Default.png) into my xcode proj and run it, the image appears in portrait mode and then the view starts in landscape mode. How can I make my splash/launch image be displayed in landscape mode only?

Tommy Herbert
  • 20,407
  • 14
  • 52
  • 57
hemant
  • 209
  • 2
  • 4
  • 8

2 Answers2

8

First thing is no one is gonna know from outside the application that application is gonna run in portrait or landscape.

If at all you still want to view the splash screen in landscape mode you have to design the image in such a way as we cannot change the behaviour of the splash screen.

Instead of designing the image as 320X480, design it as 480X320 and your problem will get solved.

hAPPY cODING...

Suresh Varma
  • 9,750
  • 1
  • 60
  • 91
  • 1
    @Jonny:Dude,Imagine a 320x480 image with image of standing man.. Rotating the image +-90 degrees wont let the man stand straight.. but designing the image in 480x320 with man standing straight will display him standing straight in landscape mode.. Hope you get what I am trying to explain ;) – Suresh Varma Jul 17 '12 at 06:22
  • You are probably right except that iPhone will never display a 480x320 splash screen. – Jonny Jul 17 '12 at 06:30
  • Iphone is gonna display 320x480(standard size) But its just a imagination that if you are in landscape it will display 480x320 – Suresh Varma Jul 17 '12 at 11:05
  • IT is going to display 320x480 but if you design the image in 480x320 it will display teh rotated image when seen in 320x480 which means it will be displayed correctly when seen in landscape mode.. Its as simple as that.. – Suresh Varma Jul 18 '12 at 05:11
  • It hasnt happened to me... so i have just changed the orientation of the image to landscape... and it working fine.... Thanks @SPVarma – Rajesh_Bangalore Oct 04 '12 at 06:59
  • What if the app has supported all the orientations? and User open the app in landscape mode instead of portrait? – RosAng Feb 23 '16 at 09:12
1

Always create 320x480 and 640x960 sized pictures. Just name them Default.png and Default@2x.png. As Michael Kessler notes, to have them appear in landscape, you have to rotate the graphics in your gfx editor.

I quote Apple docs as they look as of now:

iPhone and iPod touch Portrait 320 x 480 pixels, 640 x 960 pixels (@2x) Landscape Not supported

iPad Portrait 768 x 1004 pixels, 1536 x 2008 pixels (@2x) Landscape 1024 x 748 pixels, 2048 x 1496 pixels (@2x)

http://developer.apple.com/library/ios/DOCUMENTATION/iPhone/Conceptual/iPhoneOSProgrammingGuide/App-RelatedResources/App-RelatedResources.html#//apple_ref/doc/uid/TP40007072-CH6-SW12

So you can see that landscape orientation of images are not supported for iPhone/iPod.

Jonny
  • 15,955
  • 18
  • 111
  • 232