Contents

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

Related Documentation

Drawing the Button Content