Contents

selectSegment(withTag:)

Selects the segment with the specified tag.

Declaration

func selectSegment(withTag tag: Int) -> Bool

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

true if the segment was selected successfully; otherwise, false.

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

Related Documentation

Managing the selected segment