使用资产目录时,启动图像显示黑色 [英] Launch images show black, when using Asset Catalog

查看:139
本文介绍了使用资产目录时,启动图像显示黑色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Xcode 5 中,我使用资产目录来管理应用图标并为我的应用启动图片。应用程序图标在所有设备上都能正常运行,但启动图像只在少数设备上运行。

In Xcode 5, I use the asset catalog to manage the app icons and launch images for my app. The app icons work fine on all devices, but the launch images just on a few.

我为每个可能的设备和iOS(6.1和7.0)添加了启动图像,我想要目标。我确保所有图片都具有正确的尺寸,这在属性检查器中确认(见下图),其中图像的大小与预期的大小相匹配。我还在命名约定之后命名所有图像,资产目录(参见上图)甚至不需要这些图像。在iPhone上运行的iOS7启动图像似乎没有任何命名约定,所以我只是将它们命名为iphone4_iOS7和iphone5_iOS7。

I have added launch images for every possible device, and iOS (6.1 and 7.0), that I want to target. I have made sure that all images have the correct sizes, which is confirmed in the attributes inspector (see picture below) where the size of the images match the expected sizes. I have also named all images after the naming conventions, which should not even be necessary with asset catalog (see last picture). There does not seem to be any naming conventions for iOS7 launch images running on iPhone, so I have simply named them "iphone4_iOS7" and "iphone5_iOS7".





当我在iOS7上运行时,模拟器中显示的启动图像全部变为黑色,无论哪个设备。我也在我的iphone 5上得到了这种行为,这证实了模拟器不是问题。当我在ipad和ipad视网膜模拟器中运行iOS6时,会显示相同的黑色图像。带有iOS6的iphone模拟器的启动图像按预期工作。



The launch images shown in the simulator when I run on iOS7 all turn up completely black, no matter which device. I also get this behaviour on my iphone 5, which confirms the simulator is not the problem. The same black image is shown when I run iOS6 in the ipad and ipad retina simulators. The launch images for the iphone simulators with iOS6 works as expected.

我有很多次,无论是在模拟器还是在设备上,删除了应用程序并清理但是没有结果在任何改进中。

I have numerous times, both in simulator and on device, deleted the app and cleaned but it has not resulted in any improvement.

我做错了什么? 如何摆脱黑色启动图像并获取我在资产目录中设置的图像来显示?

推荐答案

您是否更改了项目的设置,使其指向资产目录作为启动图像的来源?

Have you changed the setting for your project so that it points to the Asset Catalog as the source for your Launch Image?

这篇关于使用资产目录时,启动图像显示黑色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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