Instance Method

selectSegmentWithTag:

Selects the segment with the specified tag.

Declaration

- (BOOL)selectSegmentWithTag:(NSInteger)tag;

Parameters

tag

The tag associated with the desired segment. A tag is an integer value that can be assigned to a segment as a way of identifying it without knowing its position in the control.

Return Value

YES if the segment was selected successfully; otherwise, NO.

Discussion

Typically, you use Interface Builder to specify the tag for each segment. You may also set this value programmatically using the setTag:forSegment: method of NSSegmentedCell.

See Also

Managing the Selected Segment

selectedSegment

The index of the selected segment of the control, or -1 if no segment is selected.

- setSelected:forSegment:

Sets the selection state of the specified segment.

- isSelectedForSegment:

Returns a Boolean value indicating whether the specified segment is selected.

selectedSegmentBezelColor

The color of the selected segment's bezel, in appearances that support it.

doubleValueForSelectedSegment

When the tracking mode for the control is set to use a momentary accelerator, returns a value for the selected segment.