简体   繁体   English

iOS:无法设置LaunchImage

[英]iOS: Unable to set LaunchImage

I have LaunchImage.png file in my iPhone Xcode 5.1 project. 我的iPhone Xcode 5.1项目中有LaunchImage.png文件。 I have added LaunchImage.png in app .plist file. 我在应用程序.plist文件中添加了LaunchImage.png。 I have drag and dropped this file in LaunchImage image xcassets. 我已将此文件拖放到LaunchImage映像xcassets中。 But, still it is throwing error as when build xcode project 但是,仍然在构建xcode项目时抛出错误

/Users/MyApplication/Images.xcassets: The launch image set named "LaunchImage" did not have any applicable content.

What could be the reason, please help! 可能是什么原因,请帮忙!

Thank yoU! 谢谢!

This is due to the dimension of the image. 这是由于图像的尺寸。 Before the error, there is a warning message also check out that . 在出现错误之前,还会显示一条警告消息,并检查。

From Doc 文件

Create launch images in different sizes for different devices. 为不同的设备创建不同大小的启动映像。 Launch images for all devices must include the status bar region. 所有设备的启动映像必须包括状态栏区域。 Create launch images in the following sizes: 创建以下尺寸的启动图像:

For iPhone 5 and iPod touch (5th generation): 对于iPhone 5和iPod touch(第5代):

640 x 1136 pixels For other iPhone and iPod touch devices: 640 x 1136像素对于其他iPhone和iPod touch设备:

640 x 960 pixels 320 x 480 pixels (standard resolution) For iPad portrait: 640 x 960像素320 x 480像素(标准分辨率)对于iPad纵向:

1536 x 2048 pixels 768 x 1024 pixels (standard resolution) For iPad landscape: 1536 x 2048像素768 x 1024像素(标准分辨率)对于iPad横向:

2048 x 1536 pixels 1024 x 768 pixels (standard resolution) 2048 x 1536像素1024 x 768像素(标准分辨率)

将您的LaunchImage.png设置为Default.png ,然后将此文件拖放到LaunchImage图像xcassets中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM