<!--
{
  "availability" : [
    "iOS: 5.0.0 -",
    "iPadOS: 5.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UISegmentedControl/setContentPositionAdjustment(_:forSegmentType:barMetrics:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UISegmentedControl(im)setContentPositionAdjustment:forSegmentType:barMetrics:"
  },
  "title" : "setContentPositionAdjustment(_:forSegmentType:barMetrics:)"
}
-->

# setContentPositionAdjustment(_:forSegmentType:barMetrics:)

Sets the content positioning offset for a given segment and bar metrics.

```
func setContentPositionAdjustment(_ adjustment: UIOffset, forSegmentType leftCenterRightOrAlone: UISegmentedControl.Segment, barMetrics: UIBarMetrics)
```

## Parameters

`adjustment`

The positioning offset for the segment that `leftCenterRightOrAlone` and `barMetrics` identify.

`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.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)