开发者

Hide all desktop icons under Mac OS

开发者 https://www.devze.com 2023-01-26 09:11 出处:网络
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?

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?

Tha开发者_如何学运维nks for your help,

Regards,


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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消