setWidth(_:forSegment:)
Sets the width of the specified segment.
Declaration
func setWidth(_ width: CGFloat, forSegment segment: Int)Parameters
- width:
The width of the segment, measured in points. Specify the value
0if you want the segment to be sized to fit the available space automatically. - segment:
The index of the segment whose width you want to set. This method raises an exception (Rangeexception) if the index is out of bounds.
See Also
Configuring Individual Segments
setLabel(_:forSegment:)label(forSegment:)setImage(_:forSegment:)image(forSegment:)setImageScaling(_:forSegment:)imageScaling(forSegment:)width(forSegment:)setEnabled(_:forSegment:)isEnabled(forSegment:)setMenu(_:forSegment:)menu(forSegment:)setToolTip(_:forSegment:)toolTip(forSegment:)setTag(_:forSegment:)tag(forSegment:)