Contents

width(forSegment:)

Returns the width of the specified segment.

Declaration

func width(forSegment segment: Int) -> CGFloat

Parameters

  • segment:

    The index of the segment whose width you want to get. This method raises an exception (Rangeexception) if the index is out of bounds.

Return Value

The width of the segment, measured in points, or 0 if the segment is sized to fit the available space automatically.

See Also

Adjusting the segment spacing