Xcode 4和iPad2闪屏问题 [英] Xcode 4 and iPad2 splash screen issue

查看:132
本文介绍了Xcode 4和iPad2闪屏问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

感谢您阅读本文。

我在Xcode 4(基于窗口的类型)中创建了一个全新的项目,并试图让启动画面工作。
如果我点击我项目的蓝色图标(项目层次结构的顶部)然后点击目标/项目,我看到我可以拖放两个启动图像以将它们用作启动画面。
我的肖像照片是一个768 x 1004 px png文件,我的风景图片是1024 x 748 png文件。
当我放下肖像照片时,一切看起来都很好但是当我对风景图片做同样的事情时,我会看到一个巨大的黄色感叹号。
如果我将鼠标指针悬停在感叹号上足够长的时间,它会说:

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:"


启动图像的大小横向模式下的iPad与建议尺寸1024 x 748像素不符合

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


为了确定,我在Photoshop和mac buit-in应用程序中进行了验证,并且都说我的图像是1024 x 748的png文件。
我尝试了另一张图片并获得了相同的消息。我创建了一个新的Xcode项目,并得到了相同的消息。
当我在iPad模拟器中构建并运行简约项目时,我会在纵向方向(ok)中纵向拖动纵向,并且在横向模式下水平纵向飞溅(不正常)。
我该怎么办?

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

仅供您参考:
当我转到Project-Info.plist时,我看到支持界面方向(iPad)它有4个项目:

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)

我还手动复制了项目根目录下的5个以下文件,但没有帮助

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

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

此时,我的项目非常最小的,只是由appDelegateh和m文件和mainWindow.xib文件组成,就是这样(我还没有编辑任何一个。)

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

任何线索?

谢谢。

推荐答案

编辑:尝试按照建议 748x1024 而不是 1024x748 这里

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

来自SO问题 - iPad启动图像风景

From SO question - iPad Launch image landscape:


如果您使用的是Xcode 4.0.2+,则风景iPad启动图像需要
为748 * 1024.这就是我在其中一个应用程序中的工作方式。

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.






此外,升级到xcode 4.1将修复即使图像尺寸正确也会出现黄色警告。


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

根据状态栏最初隐藏的plist设置,警告也会有所不同。如果它是隐藏的,那么它需要是1024x768,它不是隐藏的1024x748 ......等等。

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.

这篇关于Xcode 4和iPad2闪屏问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆