如何将我的程序添加到 OS X 系统菜单栏?

发布于 2024-08-29 10:22:12 字数 72 浏览 2 评论 0原文

我已经为 iTunes 创建了一个音量控制器,但我希望这个应用程序在 OS X 系统菜单栏上放置一个图标,并让我的滑块控制器下拉。

I have created a volume controller for iTunes but I would like this app to place an icon on the OS X system menu bar and have my slider controller drop down.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

贱贱哒 2024-09-05 10:22:12

您需要创建一个 < code>NSStatusItem 在您的应用程序中。查看状态栏文档

通常,您可以通过将 Info.plist 文件中的 LSUIElement 键设置为 YES 来创建不露面的后台应用程序,并让应用程序在启动时创建状态项。

You need to create an NSStatusItem in your app. Have a look at the Status Bars documentation.

You would normally create a faceless background app by setting the LSUIElement key in your Info.plist file to YES and have the app create the status item on launch.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文