---
title: "preferredContentSizeDidChange(forChildContentContainer:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/uihostingcontroller/preferredcontentsizedidchange(forchildcontentcontainer:)"
---

# preferredContentSizeDidChange(forChildContentContainer:)

## Declaration

```swift
@MainActor @preconcurrency override dynamic func preferredContentSizeDidChange(forChildContentContainer container: any UIContentContainer)
```

## See Also

### Managing the size

- [sizingOptions](swiftui/uihostingcontroller/sizingoptions.md)
- [sizeThatFits(in:)](swiftui/uihostingcontroller/sizethatfits(in:).md)
- [safeAreaRegions](swiftui/uihostingcontroller/safearearegions.md)
