Hide all desktop icons under Mac OS

牧云@^-^@ 提交于 2019-12-12 04:59:41

问题


I am looking for a way to show/hide desktop icons programmatically in objective-c under Mac OS X.

Do you have any idea on how I can achieve this?

Thanks for your help,

Regards,


回答1:


The Finder has a hidden preference for this. Set the value of CreateDesktop under com.apple.finder to kCFBooleanFalse, then kill the Finder. To put the desktop icons back, delete the CreateDesktop preference and kill the Finder again.

Of course, this isn't a supported API feature; it could go away at any time.




回答2:


You can't do this short of actually moving the items on and off the desktop, or patching the Finder, neither of which is a particularly good idea.

Another option is to place a window over the top of the icon you're trying to hide. See my answer to your other question.



来源:https://stackoverflow.com/questions/4222751/hide-all-desktop-icons-under-mac-os

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