如何为 Mac 创建菜单栏应用程序 [英] How to create a Menubar application for Mac

查看:34
本文介绍了如何为 Mac 创建菜单栏应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是一个很好的现成菜单栏应用程序 就是你要找的.还将字符串值为 1 的 LSUIElement 添加到您的 Info.plist 以将其从 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 创建菜单栏应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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