splash (launch image) in landscape mode? - iphone

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?

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...

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.

Related

Splash / Launch Image getting stretched in landscape mode on iPhone

I am facing an issue in my Application .
Splash / Launch Image getting stretched in landscape mode on iPhone
Right now while launching the Application in Landscape mode, the Launch Screen comes in Portrait mode and later after a few seconds,it changes to Landscape mode and then it gets stretched so only a part of the image is seen that also stretched.
Waiting for a favorable reply.
Thanks,
Jitendra Bhagat
You need to use separate splash screen image for both the orientation.
For iPhone 6:
750 x 1334 (#2x) for portrait
1334 x 750 (#2x) for landscape
For iPhone 6 Plus:
1242 x 2208 (#3x) for portrait
2208 x 1242 (#3x) for landscape

Launch splash screen in Landscape mode for iPhone 5

Our universal application is in Landscape mode only. We need to add a splash screen for iPhone 4 & iPhone 5.
For iPhone 5 in Portrait we use Default-568h#2x.png. How to set a launch screen in Landscape for iPhone 5?
According to Apple's Documentation : Providing Launch Images for Different Orientations
,
Each orientation-specific launch image must include a special modifier string in its filename. The format for orientation-specific launch image filenames is as follows:
<basename><orientation_modifier><scale_modifier><device_modifier>.png
Eg :
1) Default-Portrait.png
2) Default-PortraitUpsideDown.png
3) Default-Landscape.png
4) Default-LandscapeLeft.png
5) Default-LandscapeRight.png
Note : These modifiers are supported for launch images used in iPad apps only.
So you have to change your Image according to the Orientation for iPhone 5.
Two ways to do that :
1) Rotating the Splash Image to 90 Degree.
2) Inverting the Dimensions (320 * 480 -> 480 * 320).
to provide a landscape launch image you must create the image.. and just rotate it 90 degrees in an external image editor
Very simple
make design on splash screen in landscape mode .
and just make splash screen as you do in portrait .
user automatically make phone landscape when he/she see screen is in landscape :-)
From Apple doc, landscapes launch screens are supported for iPad only.
For iPhone and iPod Touch, you need to create a portrait launch screen that can be your 90°-oriented landscape launch screen. I would apply a clockwise rotation rather than a counter-clockwise rotation (ie so that on a desktop, you need to bend your head on the right to see the image with the correct orientation).
use these macros in pch file
#if IS_iPAD
LaunchImage=iPad.png
else
LaunchImage=iPhone.png

Why does XCode show launch image warnings?

I get the following warnings in my iPad launch images, but not the iPhone images:
I can't find the text related to the warnings anywhere.
Here are my plist settings:
And my image files:
When I tried "Default-iPad.png" it didn't fix it either.
The image dimensions are 768 x 1024 (portrait) and 1024 x 768 (landscape).
Make your mouse cursor hover over the warning sign and the warning should appear.
It'll tell you that iPad Launch Images should be 768 x 1004 and 1024 x 748
That means you have to remove the status bar from the image.
Here's the deal for launch images which work for all iPads. This should tell you exactly what to do and what you need. You need four images, either the first group or the second one, depending on if your app is set to show the top status bar or not. Notice that the names are the same whether your image has room for the status bar or not.
Description : image width x height - image name
iPad - with status bar turned ON (shows wifi connection, time, etc)
Portrait : 768x1004 - Default-Portrait.png
Landscape : 1024x748 - Default-Landscape.png
Portrait Retina : 1536x2008 - Default-Portrait#2x.png
Landscape Retina : 2048x1496 - Default-Landscape#2x.png
iPad - with status bar turned OFF (more screen real estate)
Portrait : 768x1024 - Default-Portrait.png
Landscape : 1024x768 - Default-Landscape.png
Portrait Retina : 1536x2048 - Default-Portrait#2x.png
Landscape Retina : 2048x1536 - Default-Landscape#2x.png
You can either resize your images to be 20px smaller in height, or you can make the status bar hide during app launch.
In new versions of XCode (I use 4.5.2), there is a checkbox to hide the status bar in the Project > Target > Summary settings, right above the launch image previews:

How to set the size and background of splash screen for universal app

I am using Default.png for iPhone and Default-Landscape.png for ipad. But in case of ipad the splash screen shows only half of the image and rest is cut. It seems to be the size of image becomes double of what it should be. I am using image with width:525 and height:175 for ipad.
I also added:
UILaunchImageFile~ipad Default-Landscape.png
in my info.plist file. What might be the problem? Please guide me....
Also can i set the backgroung of splash screen to white????
The landscape iPad launch image has to be 1024x748 pixels. That's the only size that will prevent your image from scaling.
I guess the iPad tries to scale your image to a height of 748 which means the width will be 2244px. Not exactly double but something like four times the size of what you want.
Create a white image with dimensions of 1024x748 and put your 525x175 image in the middle of it.
Try the image name Default#2x.png and size would be 1024X768....

iPhone SDK: Splash Screen Stretching

I have a splash screen in my app which is working fine other than the fact that the image seems to stretch slightly vertically when loaded.
The image is 320 x 460.
Any idea why the stretch is occurring?
That's because the splash screen size should be 320 × 480 (esp. if the status bar is hidden).
(You should also prepare a 640 × 960 one (Default#2x.png) for iPhone 4. You need to provide 2 or 3 more images if you need to support iPad as well. See http://developer.apple.com/library/ios/#qa/qa2010/qa1588.html for detail.)