In particular, it can be a custom view of NSPopover , NSWindow or even NSStatusItem.view . In the case of NSWindow (often an NSPanel service form) (or NSPopover ), you will manually open the window when you click on a status item using the status item -(void)setAction and -(void)setTarget . If you use a custom view for a status item, this will be done in -mouseDown:
Check out this post - I found this helpful.
Vervious
source share