Contents

insertSegment(withTitle:at:animated:)

Inserts a segment at the position you specify and gives it a title as content.

Declaration

func insertSegment(withTitle title: String?, at segment: Int, animated: Bool)

Parameters

  • title:

    A string to use as the segment’s title.

  • segment:

    An index number identifying a segment in the control.

    segment must be a number in the range 0 to the number of segments (Numberofsegments) inclusive; the segmented control pins values exceeding this upper range to the last segment.

    The method inserts the new segment just before the designated one.

  • animated:

    True if the insertion of the new segment must be animated, otherwise False.

See Also

Managing segments