How to badge file and folder using Cocoa

后端 未结 3 550
你的背包
你的背包 2020-12-29 16:21

I want to badge a file and folder with some color (image). How can this be achieved?

I tried with icon service, and it works for files, but it is not working with fo

3条回答
  •  盖世英雄少女心
    2020-12-29 17:06

    You can do this using the -setIcon:forFile:options: method on NSWorkspace, which lets you just specify an NSImage to apply to the file/folder at the path you give it.

提交回复
热议问题