Options for how a hosting controller tracks its content's size.
Members (4)
get · iOS 16.0+
intrinsicContentSize
TypeScript
get intrinsicContentSize(): UIHostingControllerSizingOptions
Swift declaration
static let intrinsicContentSize: UIHostingControllerSizingOptions
The hosting controller's view automatically invalidate its intrinsic
content size when its ideal size changes.
Use this option when the hosting controller's view is being laid out
with Auto Layout.
- Note: This option comes with a performance cost because it
asks for the ideal size of the content using the
``ProposedViewSize/unspecified`` size proposal.
get · iOS 16.0+
preferredContentSize
TypeScript
get preferredContentSize(): UIHostingControllerSizingOptions
Swift declaration
static let preferredContentSize: UIHostingControllerSizingOptions
The hosting controller tracks its content's ideal size in its
preferred content size.
Use this option when using a hosting controller with a container view
controller that requires up-to-date knowledge of the hosting
controller's ideal size.
- Note: This option comes with a performance cost because it
asks for the ideal size of the content using the
``ProposedViewSize/unspecified`` size proposal.