简体   繁体   中英

Implementing a “close” button in a OSX menu-bar app

My OSX app lives entirely in the menu bar, and thus does not have a conventional "main window" with a close button nor a standard system menu. The app was rejected due to lack of compliance with the HIG : "we have found there is no way to quit the app." Of course, the Cntrl+Q hotkey works, but that's besides the point. To clarify, here's what my app looks like: http://airgif.com/images/mordor.png

The question is: what is the preferred method for implementing a quit button in a menu-bar app? Is it sufficient to simply have a NSButton with the title of "quit app" somewhere within the app's settings?

通常的方法是在菜单底部输入退出命令。

From the Beginning of Time, Apple has enforced the Human Interface Guidelines.

A way for the user to quit the app is required.

After all, we don't want OSX to look like some webpages with popups you can't get rid of.

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