Type Property


Overridden by subclasses to return the default pop-up menu for instances of the receiving class.


class var defaultMenu: NSMenu? { get }


The default implementation returns nil.

See Also

Managing Contextual Menus

func menu(for: NSEvent) -> NSMenu?

Overridden by subclasses to return a context-sensitive pop-up menu for a given mouse-down event.

func willOpenMenu(NSMenu, with: NSEvent)

Called just before a contextual menu for a view is opened on screen.

func didCloseMenu(NSMenu, with: NSEvent?)

Called after a contextual menu that was displayed from the receiving view has been closed.