i just added a launch image to an application i wrote. According to several sources that image should be 1024 x 748 (minus 20 px for the status bar).
So i created such an image, named it Default-Landscape~ipad.png and set these values in the -Info.plist:
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationLandscapeRight</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
</array>
<key>UILaunchImageFile~ipad</key>
<string>Default-Landscape~ipad.png</string>
<key>UIInterfaceOrientation</key>
<string>UIInterfaceOrientationLandscapeRight</string>
<key>UILaunchImageFile</key>
<string>Default-Landscape~ipad.png</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
I know, there is UILaunchImageFile and UILaunchImageFile~ipad in there, i also tried that with only one of them in there.
What i observe is that the launch image is displayed, but it is rotated by 90 degrees counterclockwise, scaled to cover the whole screen (which creates some parts that will not be visible) and then cropped.
Whatever i tried, i could not get the launch image to display correctly in landscape orientation.
That app i write is iPad only, no universal app, it is for iPad 1 running iOS 5.1. I use Xcode 4.3.1.
What do i need to do to display the launch image correctly in landscape orientation?
EDIT:
In the MainWindow.xib the main window is in portrait orientation, i think it is likely that this influences the problem. I’ve put the main window into portrait mode as adding and removing subviews was a problem in landscape mode.
This hint i also got on StackOverflow.
So the real question could be: How do i create an iPad app that works in landscape mode and in which i can add / remove subviews to the main window?
Thanks for any hints,
Torsten.
If you want to use the UILaunchImageFile key to name your images something other than the default the name would be the base(first part) of the image name. Your is:
Default-Landscape~ipad.png, which would mean the actual name should be:
Default-Landscape~ipad.png-LandscapeLeft.png…For landscape left.
You can just use the default naming convention:
and not use the UILaunchImageFile key, or if you want to use it name it something like:
IpadLaunchImage,under the key UILaunchImageFile~ipad then:
Then create another key for iPhone in the same manner but with the UILaunchImageFile~iphone key and a different name,example: IphoneLaunchImage.
Also straight from the Apple doc’s:
Here’s the link:
http://developer.apple.com/library/ios/#DOCUMENTATION/iPhone/Conceptual/iPhoneOSProgrammingGuide/App-RelatedResources/App-RelatedResources.html