NSMenuItem
extension NSMenuItem
-
A convenience init for
NSMenuItem.Declaration
Swift
public convenience init(title: String, image: NSImage? = nil, target: AnyObject? = nil, action: Selector? = nil, keyEquivalent: String = "", isEnabled: Bool = true)Parameters
titleThe title of the menu item.
imageThe image for the menu item.
targetThe target to be associated with the menu item.
actionThe action selector to be associated with the menu item.
keyEquivalentA string representing a keyboard key to be used as the key equivalent.
isEnabledA Boolean value that indicates whether the menu item is enabled.
View on GitHub
NSMenuItem Extension Reference