Contents

contentOffsetForSegment(at:)

Returns the offset for drawing the content (image or text) of the segment you specify.

Declaration

func contentOffsetForSegment(at segment: Int) -> CGSize

Parameters

  • segment:

    An index number that identifies a segment in the control. It must be a number between 0 and the number of segments (Numberofsegments) minus 1; the segmented control pins values exceeding this upper range to the last segment.

Return Value

The offset (as a CGSize structure) from the origin of the segment at which to draw the segment’s content.

See Also

Managing segment behavior and appearance