How can i add icon overlay in finder?

ε祈祈猫儿з 提交于 2019-12-09 11:51:15

问题


When we open Dropbox folder, we can see icon on the left bottom of the folder.

I am developing an application in which i also want the same behavior. If folder is syncing then it will show sync icon and for other operation it will show other icon. The marked files/folder when viewed in Finder must be shown with a custom icon. But when they are selected for preview ( using spacebar) they must show their original icon ( i.e the blue icon for folder etc) .


Can anyone please help me out ?? Thanks :)

回答1:


Starting with Yosemite (10.10), there is now an officially supported (and thus Mac App Store compatible, hopefully) method for displaying sync status badges in Finder icons in the form of Finder Sync extensions.




回答2:


Dropbox has developed a NSPlugin for showing icon badges on each folder/file. As you would know, NSPlugins for Finder were deprecated by Apple starting with Snow Leopard. I think Dropbox worked around it with a hack - that reenabled plugin support. I don't think Apple would have liked that. Apple wants third party apps to only provide services support, since they don't want any third party code in Finder's process, but services are underwhelming.




回答3:


This can be achieved by creating new Finder Sync Extension. Find more information here: https://stackoverflow.com/a/43183393



来源:https://stackoverflow.com/questions/7991131/how-can-i-add-icon-overlay-in-finder

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!