Contents

setImageScaling(_:forSegment:)

Sets the image scaling mode for the specified segment.

Declaration

func setImageScaling(_ scaling: NSImageScaling, forSegment segment: Int)

Parameters

  • scaling:

    The scaling mode to assign to the specified segment. For the possible values, see Style.

  • segment:

    The index of the segment whose image scaling mode you want to set. This method raises an exception (Rangeexception) if the index is out of bounds.

Discussion

The image scaling mode for a segment affects how the image inside the corresponding cell is positioned and resized when the cell itself grows or shrinks. The image scaling mode does not itself cause the cell to change size in any way. If a cell does not contain an image, the scaling mode has no effect.

See Also

Configuring Individual Segments