<!--
{
  "availability" : [
    "macOS: 10.10.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSClipView/contentInsets",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSClipView(py)contentInsets"
  },
  "title" : "contentInsets"
}
-->

# contentInsets

The distance that the content view is inset from the enclosing scroll view.

```
var contentInsets: NSEdgeInsets { get set }
```

## Discussion

When the enclosing scroll view’s [`contentInsets`](/documentation/AppKit/NSScrollView/contentInsets) value is nonzero (that is, the value is not {0,0,0,0}), the scroll view sets the frame of its content view to the scroll view’s bounds minus the scroll view’s border, if it has one. (When the [`contentInsets`](/documentation/AppKit/NSScrollView/contentInsets) value is equal to zero, the scroll view adjusts its `contentView.frame` to fit inside all the other views the scroll view maintains.) When the value of `contentView.automaticallyAdjustsContentInsets` is <doc://com.apple.documentation/documentation/Swift/true> (which is the default value), the header, rulers, and other views are overlaid on top of the content view and the scroll view sets the correct [`contentInsets`](/documentation/AppKit/NSScrollView/contentInsets) value on the [`contentView`](/documentation/AppKit/NSScrollView/contentView). Note that you can animate the clip view when this property changes by calling `[self animator]`.

---

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)