本文介绍了如何创建Mac的Menubar应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
编辑:这是一个很好的现成菜单应用程序是你在找什么。还要向Info.plist添加字符串值为1的LSUIElement,以将其从Dock中隐藏。
EDIT: This is a nice ready-made menubar application here (github source) by this answer.
I was wondering how to make a menubar application, what are the requirements for that to do so?
I saw a simple application for the menubar was to open links using your browser, I want to create something similar to that.
This is the application I like to make similar.
解决方案
NSStatusItem is what you are looking for. Also add LSUIElement with string value of 1 to your Info.plist to hide it from Dock.
这篇关于如何创建Mac的Menubar应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!