[英]How do you create NSMenuItem similar to Dropbox's menu dropdown?
Dropbox has a wonderful new dropdown view for their menubar app. 对于他们的菜单栏应用程序,Dropbox具有一个很棒的新下拉列表视图。 I have failed to find similiar cocoa examples to duplicate this type of view.
我没有找到类似的可可粉例子来复制这种观点。 NSMenuItem seems to be for basic lists.
NSMenuItem似乎用于基本列表。 Any pointers in the right direction?
任何指向正确方向的指针?
It's not a NSMenuItem
. 不是
NSMenuItem
。 It is a NSStatusItem
that resides in the systemwide NSStatusBar
. 它是一个
NSStatusItem
,位于系统范围的NSStatusBar
。 The distinction is important, because NSStatusItem
s can call just about any method on any given object of your application when they're clicked. 区别很重要,因为
NSStatusItem
时,它们几乎可以在应用程序的任何给定对象上调用任何方法。
I suspect that their NSStatusItem
triggers an action that displays a borderless window. 我怀疑他们的
NSStatusItem
触发了显示无边界窗口的动作。
You can find more information about status items in the Status Bar Programming Topics document. 您可以在“ 状态栏编程主题”文档中找到有关状态项的更多信息。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.