---
title: preferredContentSize
framework: swiftui
role: symbol
role_heading: Type Property
path: swiftui/nshostingsizingoptions/preferredcontentsize
---

# preferredContentSize

The hosting controller creates and updates constraints that represent its content’s ideal size. These constraints in turn influence the hosting controller’s preferredContentSize.

## Declaration

```swift
static let preferredContentSize: NSHostingSizingOptions
```

## Discussion

Discussion The constraints reflect the size that fits a proposal of .unspecified. note: This option has no effect when used with an NSHostingView directly.

## See Also

### Geting sizing options

- [intrinsicContentSize](swiftui/nshostingsizingoptions/intrinsiccontentsize.md)
- [maxSize](swiftui/nshostingsizingoptions/maxsize.md)
- [minSize](swiftui/nshostingsizingoptions/minsize.md)
- [standardBounds](swiftui/nshostingsizingoptions/standardbounds.md)
