如何在OS X中为我的文档创建图标 [英] How do I create icon for my documents in OS X

查看:160
本文介绍了如何在OS X中为我的文档创建图标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个基于文档的应用程序.因此,我需要为我的应用程序提供一个图标,并为我的文档提供一个图标.

I have a document-based application. So I need an icon for my app as well as an icon for my documents.

在Xcode/Images.xcassets中,有一个名为AppIcon的项目,我可以使用它来设置应用程序的图标.

In Xcode/Images.xcassets there is an item called AppIcon which I can use for setting the icon of the app.

但是如何为我的文档制作图标?

But how do I make an icon for my documents?

这是我在TARGETS/文档类型和TARGETS/导出的UTI下尝试过的内容

Here is what I have tried under TARGETS/Document Types and TARGETS/Exported UTIs

我尝试了Internet上建议的其他方法,但是没有任何效果.文档图标始终为空,如下所示:

I have tried different methods suggested on Internet but nothing works. The doc icon is always blank and empty as you can see below:

推荐答案

事实证明,如果更改图标,则也必须更改扩展名才能显示图标.

It turns out that if you change your icon you have to change the extension as well in order for the icon to show up.

所以我要做的是先测试没有任何图标变成空白图标,然后再尝试添加真实图标.那没有用.相反,添加新图标后,还请确保更改扩展名.

So what I did was to first test without any icon getting an empty icon, and then tried to add the real icon. That did not work. Instead as soon as you add a new icon, also make sure to change the extension.

可笑的是,这么小的事情怎么会让你整日迷失,而且我什至没有在网上找到任何暗示.

It is funny how such a little thing can make you lose a whole day, and also that I didn't find even a hint on this on the net.

这篇关于如何在OS X中为我的文档创建图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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