Instance Method

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.