Type Method


Returns a new instance of a given standard window button, sized appropriately for a given window style.


class func standardWindowButton(_ b: NSWindow.ButtonType, for styleMask: NSWindow.StyleMask) -> NSButton?



The type of standard window button to return.


The window style for which b is to be sized. See NSWindow.StyleMask for the list of allowable values.

Return Value

The new window button of the type identified by b; nil when no such button type exists.


The caller is responsible for adding the button to the view hierarchy and for setting the target to be the window.

See Also

Managing Title Bars

func standardWindowButton(NSWindow.ButtonType) -> NSButton?

Returns the window button of a given window button kind in the window’s view hierarchy.

var showsToolbarButton: Bool

A Boolean value that indicates whether the toolbar control button is currently displayed.

var titlebarAppearsTransparent: Bool

A Boolean value that indicates whether the title bar draws its background.