如何隐藏 Dock 图标 [英] How to hide the Dock icon

查看:25
本文介绍了如何隐藏 Dock 图标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想优先选择隐藏 Dock 图标并显示 NSStatusItem.我可以创建 StatusItem,但我不知道如何从 Dock 中删除该图标.:-/

I want to make a preference for hiding the Dock icon and showing an NSStatusItem. I can create the StatusItem but I don't know how to remove the icon from Dock. :-/

有什么想法吗?

推荐答案

我认为您正在 Info.plist 中寻找 LSUIElement

I think you are looking for the LSUIElement in the Info.plist

LSUIElement(字符串).如果此键设置为1",则启动服务将应用程序作为代理应用程序运行.代理应用程序不会出现在 Dock 或强制退出窗口中.尽管它们通常作为后台应用程序运行,但如果需要,它们也可以进入前台以呈现用户界面.

LSUIElement (String). If this key is set to "1", Launch Services runs the application as an agent application. Agent applications do not appear in the Dock or in the Force Quit window. Although they typically run as background applications, they can come to the foreground to present a user interface if desired.

此处查看有关转动它的简短讨论开/关

See a short discussion here about turning it on/off

这篇关于如何隐藏 Dock 图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆