<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSCollectionViewLayout/targetContentOffset(forProposedContentOffset:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSCollectionViewLayout(im)targetContentOffsetForProposedContentOffset:"
  },
  "title" : "targetContentOffset(forProposedContentOffset:)"
}
-->

# targetContentOffset(forProposedContentOffset:)

Returns the offset value to use after an animated layout update or change.

```
func targetContentOffset(forProposedContentOffset proposedContentOffset: NSPoint) -> NSPoint
```

## Parameters

`proposedContentOffset`

The proposed point (in the collection view’s coordinate space) for the lower-left corner of the visible content. The collection view calculates this value as the most likely value to use at the end of animations.

## Return Value

The offset value that you want to use for the content.

## Discussion

During layout updates, or when transitioning between layouts, the collection view calls this method to give you the opportunity to tweak the position of the collection view’s content at the end of animations. The default implementation of this method returns the value in the `proposedContentOffset` parameter. Subclasses can override it and return an offset value that positions content in a way that is more optimal for the custom layout.

---

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)