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

99封情书 提交于 2019-12-22 06:36:12

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/2687938/how-to-add-my-program-to-the-os-x-system-menu-bar

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!