隐藏Mac操作系统下的所有桌面图标
我正在寻找一种在 Mac OS X 下的 Objective-C 中以编程方式显示/隐藏桌面图标的方法。
您知道我如何实现这一目标吗?
感谢您的帮助,
问候,
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,
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Finder 对此有一个隐藏的偏好。将
com.apple.finder
下的CreateDesktop
的值设置为kCFBooleanFalse
,然后终止Finder。要恢复桌面图标,请删除CreateDesktop
首选项并再次终止 Finder。当然,这不是受支持的 API 功能;它随时可能消失。
The Finder has a hidden preference for this. Set the value of
CreateDesktop
undercom.apple.finder
tokCFBooleanFalse
, then kill the Finder. To put the desktop icons back, delete theCreateDesktop
preference and kill the Finder again.Of course, this isn't a supported API feature; it could go away at any time.
如果不实际将项目移入或移出桌面,或者修补 Finder,则无法做到这一点,这两者都不是一个特别好的主意。
另一种选择是在您要隐藏的图标顶部放置一个窗口。请参阅我对您的其他问题的回答。
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.