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

# intrinsicContentSize

The natural size for the receiving view, considering only properties of the view itself.

```
var intrinsicContentSize: NSSize { get }
```

## Return Value

A size indicating the natural size for the receiving view based on its intrinsic properties.

## Discussion

The default width and height values of this property are set to [`noIntrinsicMetric`](/documentation/AppKit/NSView/noIntrinsicMetric). For a custom view, you can override this property and use it to communicate what size you would like your view to be based on its content. You might do this in cases where the layout system cannot determine the size of the view based solely on its current constraints. For example, a text field might override this method and return an intrinsic size based on the text it contains. The intrinsic size you supply must be independent of the content frame, because there’s no way to dynamically communicate a changed width to the layout system based on a changed height. If your custom view has no intrinsic size for a given dimension, you can set the corresponding dimension to the [`noIntrinsicMetric`](/documentation/AppKit/NSView/noIntrinsicMetric).

---

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)