如何创建Mac的Menubar应用程序 [英] How to create a Menubar application for Mac

查看:291
本文介绍了如何创建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应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆