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

# setTargetOffsetFromCenter(_:for:)

Sets the offset, from the center of a dynamic item, at which to apply the push behavior’s force vector.

```
func setTargetOffsetFromCenter(_ o: UIOffset, for item: any UIDynamicItem)
```

## Parameters

`o`

The offset, from the center of the dynamic item, at which to apply the push behavior’s force vector.

`item`

The dynamic item for which you’re setting a target offset.

## Discussion

If you don’t set a target offset for a dynamic item, a push behavior’s force vector is applied at the item center.

---

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)