Instance Method

drawTitle(_:withFrame:in:)

Draws the button’s title centered vertically in a specified rectangle.

Declaration

func drawTitle(_ title: NSAttributedString, withFrame frame: NSRect, in controlView: NSView) -> NSRect

Parameters

title

The title of the button.

frame

The rectangle in which to draw the title.

controlView

The control being drawn.

Return Value

The bounding rectangle for the text of the title.

Discussion

This method is called automatically when the button is redrawn; you should not call it directly.

See Also

Drawing the Button Content

func drawBezel(withFrame: NSRect, in: NSView)

Draws the border of the button using the current bezel style.

func drawImage(NSImage, withFrame: NSRect, in: NSView)

Draws the image associated with the button’s current state.