gpt4 book ai didi

macos - 阻止状态栏应用程序在 Dock 中显示图标

转载 作者:行者123 更新时间:2023-12-03 16:57:19 24 4
gpt4 key购买 nike

几周前我为 Mac 创建了一个状态栏应用程序。但是,每当我运行该应用程序时,停靠栏图标都会与状态栏中的项目一起单独显示。有没有办法阻止应用程序出现在 Dock 中?

最佳答案

我无法写评论,但对于 @Michael Dautermann 所写的内容,我建议使用 LSUIElement 键。

您说过它是一个状态栏应用程序,因此它有一个 UI。

LSUIElement (String - OS X) specifies whether the app runs as an agent app. If this key is set to “1”, Launch Services runs the app as an agent app. Agent apps do not appear in the Dock or in the Force Quit window. Although they typically run as background apps, they can come to the foreground to present a user interface if desired. A click on a window belonging to an agent app brings that app forward to handle events. The Dock and loginwindow are two apps that run as agent apps.

尽管文档说它是一个字符串,所以你也可以将其设置为 bool。

关于macos - 阻止状态栏应用程序在 Dock 中显示图标,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22927117/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com