<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.1.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Messages",
  "identifier" : "/documentation/Messages/MSStickerBrowserView/setContentOffset(_:animated:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Messages"
    ],
    "preciseIdentifier" : "c:objc(cs)MSStickerBrowserView(im)setContentOffset:animated:"
  },
  "title" : "setContentOffset(_:animated:)"
}
-->

# setContentOffset(_:animated:)

Sets the offset distance between the content and the browser’s origin.

```
func setContentOffset(_ contentOffset: CGPoint, animated: Bool)
```

## Parameters

`contentOffset`

The distance that the content is offset from the browser’s origin.

`animated`

A Boolean value that determines whether the change is animated. If <doc://com.apple.documentation/documentation/Swift/true>, the change is animated at a constant velocity. If <doc://com.apple.documentation/documentation/Swift/false>, the change takes place immediately.

## Discussion

Increasing the offset’s `x` value shifts the content to the left. Increasing the offset’s `y` value shifts the content upward.

---

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)