开发者

Launch Image on iPad only in PortraitMode (Only device)

I wrote an iPad app and I'm using two different images as launch images. The iOS simulator shows the proper image during startup but the device always uses the portrait image. I have the right file size (Xcode does NOT give me any warnings)!

I'm u开发者_如何学编程sing iOS5 Beta 7 with Xcode 4.2

Here is what I did so far:

  • I double checked all the file sizes
  • I readded the files to the project,
  • I build the project from scratch (including 'Clean')
  • I cleaned the workspace's derived data directory.
  • I deleted the app completely from the device.
  • I restarted the device.

I'm running out of ideas.

Any ideas?


In iOS 3.2 and later, an iPad application can provide both landscape and portrait versions of its launch images. 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_usage_specific_modifiers_scale_modifier_device_modifier.png

Application Launch Images.


I solved it. I couldnt find any mistakes. So I removed everything according the launchimage from the project (including entries in info.plist), deleted the derived workspace folder, deleted the app from the device. Inserted the pictures again an set the basename for the image in info.plist. It worked. still don't know why.

Btw: It seems like Xcode 4.2 (and iOS5) changes the sizes of the launch images for the iPad.

iOS < 5: Portrait 768x1004px Landscape: 1024x748px (Source)

iOS = 5: Portrait 768x1024px Landscape: 1024x768px (Source: Image)

Launch Image on iPad only in PortraitMode (Only device)


I did this:

  1. Rename image to Default-Landscape~ipad.png
  2. In Info.plist register it as

Blockquote

<key>UILaunchImageFile~ipad</key>
<string>${PRODUCT_NAME}/Default.png</string>

Blockquote

and it seems to work...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜