简体   繁体   中英

How to add my program to the OS X system menu bar?

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM