[英]App icon displays a black square.
I am having my app icon be displayed as a black square instead of the intended image. 我的应用程序图标显示为黑色正方形,而不是预期的图像。
I have placed all of my AppIcons into the folder, Im wondering what could be causing this. 我已将所有AppIcons放入文件夹中,我想知道是什么原因引起的。
Your image needs to be an opaque PNG. 您的图片必须是不透明的PNG。 No transparency or anything, as well as being the correct size.
没有透明度或任何东西,以及正确的尺寸。
If it already is that, try opening it in Preview and re-saving it as a PNG. 如果已经足够了,请尝试在“预览”中将其打开,然后将其重新保存为PNG。 That way OS X 'generated' it and it should be compatible.
这样,OS X“生成”了它,它应该兼容。 If that helps fix the issue, then your image editing program is saving in the wrong format...see info below.
如果这有助于解决问题,则您的图像编辑程序正在以错误的格式保存...请参阅下面的信息。
Apple has this to say on generating PNGs: 苹果在生成PNG时有这样的说法:
For all images and icons, the PNG format is recommended.
对于所有图像和图标,建议使用PNG格式。 You should avoid using interlaced PNGs.
您应该避免使用隔行扫描的PNG。
The standard bit depth for icons and images is 24 bits—that is, 8 bits each for red, green, and blue—plus an 8-bit alpha channel.
图标和图像的标准位深度为24位,即红色,绿色和蓝色分别为8位和8位alpha通道。
I have had this happen when the app is listed as a .png file, but the system is recognizing it as a .jpg or some other type ... find your icon in "finder" and open it with preview, go to the file menu select "export as" and make sure you choose PNG as the save format. 当应用程序列为.png文件时,我曾发生过这种情况,但系统将其识别为.jpg或其他类型的文件...在“查找器”中找到您的图标,并使用预览打开它,转到文件菜单中选择“导出为”,并确保选择PNG作为保存格式。 Delete the old version in the application, delete the derived data, clean your project, and rebuild the application.
在应用程序中删除旧版本,删除派生数据,清理项目,然后重建应用程序。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.