Contents

standardWindowButton(_:for:)

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

Declaration

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

Parameters

  • b:

    The type of standard window button to return.

  • styleMask:

    The window style for which b is to be sized. See Stylemask Swift.struct 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.

Discussion

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