Instance Method

insertSegmentWithImage:atIndex:animated:

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

Declaration

- (void)insertSegmentWithImage:(UIImage *)image atIndex:(NSUInteger)segment animated:(BOOL)animated;

Parameters

image

An image object to use as the content of the segment.

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

The new segment is inserted just before the designated one.

animated

YES if the insertion of the new segment should be animated, otherwise NO.

See Also

Managing Segments

- insertSegmentWithTitle:atIndex:animated:

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

numberOfSegments

Returns the number of segments the receiver has.

- removeAllSegments

Removes all segments of the receiver

- removeSegmentAtIndex:animated:

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

selectedSegmentIndex

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