Xcode 6.1 关于在资产目录中启动图像的警告
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/26881474/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Xcode 6.1 Warning about Launch Image in Asset Catalog
提问by Arnold
I am using Xcode 6.1 to create a app supporting iOS 6 and later.
我正在使用 Xcode 6.1 创建一个支持 iOS 6 及更高版本的应用程序。
.In target's "App Icons and Launch Images", I set the Launch Images Source as "Use Asset Catalog" and Launch Screen File to "LaunchScreen".
.在目标的“应用程序图标和启动图像”中,我将启动图像源设置为“使用资产目录”,将启动屏幕文件设置为“启动屏幕”。
In Images.xcassets which created by Xcode, I fill in every box for "LaunchImage", but there's always a warning message:
在由 Xcode 创建的 Images.xcassets 中,我填写了“LaunchImage”的每个框,但总是有一条警告消息:
Retina 4-inch Support. Applications using Launch Screen Files and targeting iOS 7.1 and earlier need to also include a Launch Image in an Asset Catalog.
视网膜 4 英寸支持。使用启动屏幕文件并针对 iOS 7.1 及更早版本的应用程序还需要在资产目录中包含启动图像。
I created another Image Set named as "Default" and fill in the "Retina 4 2x" box with expected image. But the warning message still there.
我创建了另一个名为“默认”的图像集,并用预期的图像填充“Retina 4 2x”框。但是警告信息仍然存在。
Any hint to clear this warning? Thanks.
任何清除此警告的提示?谢谢。
回答by user2199783
I ran into the exact same problem this morning. Here's how I fixed it.
今天早上我遇到了完全相同的问题。这是我修复它的方法。
Select your Target in the project navigator. Under the Generaltab, you should see the section for App Icons and Launch Images. Where you see Launch Images Source, click 'Use Asset Catalog'.
You will then see Migrate launch images to an asset catalogdialogue. Click 'Migrate'.
Make sure that your Launch Images Sourceon the previous screen points to the right image set in your asset catalog. In your case, you would set it to 'Default'.
在项目导航器中选择您的目标。在General选项卡下,您应该看到App Icons 和 Launch Images 部分。在您看到启动图像源的位置,单击“使用资产目录”。
然后,您将看到将启动图像迁移到资产目录对话框。单击“迁移”。
确保上一个屏幕上的Launch Images Source指向资产目录中的正确图像集。在您的情况下,您可以将其设置为“默认”。
That should take care of the warning. Hope that helps!
那应该注意警告。希望有帮助!