Instance Method

setLabel:forSegment:

Sets the label for the specified segment.

Declaration

- (void)setLabel:(NSString *)label forSegment:(NSInteger)segment;

Parameters

label

The label you want to display in the segment. If the width of the string is greater than the width of the segment, the string's text is truncated during drawing.

segment

The index of the segment whose label you want to set. This method raises an exception (NSRangeException) if the index is out of bounds.

See Also

Configuring the Segment Text