Contents

imageForSegment(at:)

Returns the image for a specific segment.

Declaration

func imageForSegment(at segment: Int) -> UIImage?

Parameters

  • segment:

    An index number identifying 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

Returns the image assigned to the receiver as content. If there is no image, it returns nil.

See Also

Managing segment content