setContentPositionAdjustment(_:forSegmentType:barMetrics:)
Sets the content positioning offset for a given segment and bar metrics.
Declaration
func setContentPositionAdjustment(_ adjustment: UIOffset, forSegmentType leftCenterRightOrAlone: UISegmentedControl.Segment, barMetrics: UIBarMetrics)Parameters
- adjustment:
The positioning offset for the segment that
leftCenterRightOrAloneandbarMetricsidentify. - leftCenterRightOrAlone:
An identifier for a segment type.
- barMetrics:
Bar metrics.
Discussion
You use this method to adjust the position of a title or image within the given segment of a segmented control.
See Also
Customizing appearance
selectedSegmentTintColorbackgroundImage(for:barMetrics:)setBackgroundImage(_:for:barMetrics:)contentPositionAdjustment(forSegmentType:barMetrics:)UISegmentedControl.SegmentdividerImage(forLeftSegmentState:rightSegmentState:barMetrics:)setDividerImage(_:forLeftSegmentState:rightSegmentState:barMetrics:)titleTextAttributes(for:)setTitleTextAttributes(_:for:)