简体   繁体   English

启动图像不适用于资产目录

[英]Launches images don't work with asset catalog

I've worked on this for many hours, but for some reason I can't get launch images to show up on iPhone devices using the asset catalog. 我已经为此工作了好几个小时,但是由于某些原因,我无法使用资产目录在iPhone设备上显示启动图像。 The same images will show up on iPad devices and if I switch to not using asset catalog the same images will work on iPhone devices, but not the iPad. 相同的图像将显示在iPad设备上,如果我切换为不使用资产目录,则相同的图像将在iPhone设备上起作用,但不适用于iPad。 I cleaned the folder, deleted the app, and reinstalled it on the iPhone and my iPad devices, but nothing works. 我清理了文件夹,删除了应用程序,然后将其重新安装在iPhone和iPad设备上,但没有任何效果。 I've taken screen shots below. 我在下面拍摄了屏幕截图。 Please help! 请帮忙!

Also, my app icons work perfectly using the asset catalogs on all devices and the launch images all work on the iOS simulator. 另外,我的应用程序图标可以在所有设备上使用资产目录完美运行,并且启动映像都可以在iOS模拟器上正常运行。

Screenshot1 Screenshot1

在此处输入图片说明

Screenshot2 Screenshot2

在此处输入图片说明

Screenshot3 Screenshot3

在此处输入图片说明

Check for any duplicate image files in the bundle. 检查捆绑软件中是否有重复的图像文件。 If two files are there with the same name, then this issue can occcur. 如果两个文件具有相同的名称,则可能会发生此问题。

This might be silly, but we had the same issue and it turned out that clients had submitted JPG instead of PNG images. 这可能很愚蠢,但是我们遇到了同样的问题,结果发现客户提交了JPG而不是PNG图像。 Once we found out (because we couldn't open a jpg type with extension png in photoshop) it was an easy fix to simply re-save images as true png. 一旦发现(因为我们无法在photoshop中打开扩展名为png的jpg类型),就可以轻松地将图像重新保存为真正的png。

This will probably by a very minority of you guys having this issue, but thought I'd add it just in case. 可能会有少数人遇到这个问题,但是我想以防万一。

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

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