Contents

knobRect(flipped:)

Returns the rectangle in which the slider knob is drawn.

Declaration

func knobRect(flipped: Bool) -> NSRect

Parameters

  • flipped:

    True if the coordinate system of the associated NSSlider or NSMatrix is flipped; otherwise False. You can determine whether this is the case by sending the NSView message Isflipped message to the NSMatrix or NSSlider.

Return Value

The rectangle in which the knob is drawn, specified in the coordinate system of the NSSlider or NSMatrix with which the receiver is associated.

Discussion

The knob rectangle depends on where in the slider the knob belongs—that is, it depends on the receiver’s minimum and maximum values and on the value the position of the knob will represent.

See Also

Displaying the Cell