开发者

Xcode 4 and iPad2 splash screen issue

开发者 https://www.devze.com 2023-04-08 16:12 出处:网络
Thank you for reading this. I created a brand new project in Xcode 4 (Window based kind) and tried to get the splash screens working.

Thank you for reading this.

I created a brand new project in Xcode 4 (Window based kind) and tried to get the splash screens working. If I click on the blue icon of my project (top of the project hierarchy) and then click on "Target/Project", I see that I can drag and drop two launch images to use them as splash screens. My portrait picture is a 768 x 1004 px png file and my landscape picture is a 1024 x 748 png file. When I drop the portrait picture, everything looks fine but when I do the same with the landscape picture, I have a big yellow exclamation point that appears. If I hover my mouse pointer long enough on the exclamation point, it says:"

开发者_如何学Go

the size of the launch image for iPad in landscape mode does not match the recommended size of 1024 x 748 pixels

". Just to be sure, I verified in Photoshop and a mac buit-in application and both do say my image is a png file of 1024 x 748. I tried another picture and got the same message. I created a new Xcode project and also got the same message. When I build and run the minimalistic project in the iPad simulator, I get the portrait splash vertically in Portrait orientation (ok) and the portrait splash horizontally in Landscape mode (not ok). What can I do?

Just for you to know: When I go to the Project-Info.plist, I do see "Supported Interface Orientations (iPad)" and it has 4 items:

  • Portrait (Bottom home button)
  • Portrait (top home button)
  • Landscape (left home button)
  • Landscape (right home button)

I also copied manually the 5 following files at the root of the project but it didn't help

  • Default-Landscape~ipad.png
  • Default-Portrait~ipad.png
  • Default-LandscapeLeft~ipad.png
  • Default-LandscapeRight~ipad.png
  • Default-PortraitUpsideDown~ipad.png

Whatever I do, it just recognizes the portrait picture and uses them for each orientation...

At this point, my project is very minimal and is just made of an appDelegate "h" and "m" file and a "mainWindow.xib" file, that's it (I didn't edit any of them yet).

Any clue?

Thank you.


Edit: try making the image 748x1024 instead of 1024x748 as suggested here.

From SO question - iPad Launch image landscape:

If you're on Xcode 4.0.2+ then the landscape iPad launch image needs to be 748 * 1024. This is how it works in one of my apps.


Also, Upgrading to xcode 4.1 will fix the big yellow warning you get even when an image is the correct size.


The warning is also different based on your plist setting for "Status Bar is initially hidden" or not. If it's hidden, then it needs to be 1024x768, it not hidden then 1024x748... etc.

0

精彩评论

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