I'm following the iOS Programming guide on "Providing Launch Images for Different Orientations" and can't seem to get my iPad-specific launch images to work. If I'm reading the docs right, "Default~ipad.png" should be used as the launch image if I launch my app in the iPad simulator, but instead it's using my "Default.png".
If I tell the simulator to run as an iPhone4, it does correctly use my "[email protected]". But that just leaves me more confused as to why the iPad version isn't working.
Anyone know how to make iPad-specific launch images work?
There are a few ways to do this. My preferred way is from the "iOS App Programming Guide"
Providing Launch Images for Different Orientations:
In Info.plist, set UILaunchImageFile
to a base name: 'MyAppName.png'
In your bundle, create files using this naming structure:
<basename><orientation_modifier><scale_modifier><device_modifier>.png
Example: I used all these names for iPad, iPhone, 1x and 2x:
MyAppName-Portrait~ipad.png
MyAppName-Landscape~ipad.png
MyAppName-Portrait@2x~ipad.png
MyAppName-Landscape@2x~ipad.png
MyAppName-Portrait~iphone.png
MyAppName-Landscape~iphone.png
MyAppName-Portrait@2x~iphone.png
MyAppName-Landscape@2x~iphone.png
// iphone 5
MyAppName-Portrait-568h@2x~iphone.png
MyAppName-Landscape-568h@2x~iphone.png
Caution: Put the @2x
in the right place, this is the one case where it doesn't sit at the end of the filename
This method works particularly well when you have multiple build targets and you don't want to use the Default.png filename
I managed to get it working by supplying an iPad-specific key in the app's Info.plist, rather than using an iPad-specific filename, as the docs suggest.
My Launch image for iPad is "iPadDefault.png" and I added the following key/value in my Info.plist
<key>UILaunchImageFile~ipad</key>
<string>iPadDefault</string>
Since you're doing a universal app, the naming convention changes !
here's a quote form the Guidelines !
Include launch images for both iPhone and iPad. iPhone launch image will still be named Default.png and [email protected]. Name your iPad portrait launch image Default-Portrait.png (do not use Default.png as the iPad portrait launch image).
Meaning, there is no portrait/landscape, etc... you just have to rename the files this way:
iPhone(iPod): Default.png and [email protected]
iPad: Default-Portrait.png and [email protected] (the @2x version is for the new iPad !)
Just had the same issue and this fixed it to me, I'm not sure if the left and right orientation is even available on the universal binaries !, but this def works for me !
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With