Instance Method

removeSegment(at:animated:)

Removes the specified segment from the receiver, optionally animating the transition.

Declaration

func removeSegment(at segment: Int, animated: Bool)

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; values exceeding this upper range are pinned to it.

animated

true if the removal of the new segment should be animated, otherwise false.

See Also

Managing Segments

func insertSegment(with: UIImage?, at: Int, animated: Bool)

Inserts a segment at a specified position in the receiver and gives it an image as content.

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

Inserts a segment at a specific position in the receiver and gives it a title as content.

var numberOfSegments: Int

Returns the number of segments the receiver has.

func removeAllSegments()

Removes all segments of the receiver

var selectedSegmentIndex: Int

The index number identifying the selected segment (that is, the last segment touched).