One Logo Pool Ball
SwiftUI · IOS API REFERENCE

UIHostingControllerSizingOptions

struct · iOS 16.0+ · SDK 27.1

struct UIHostingControllerSizingOptions

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.

init · iOS 16.0+

init

TypeScript
init(rawValue: number): UIHostingControllerSizingOptions
Swift declaration
init(rawValue: Int)

Creates a new option set from a raw value.

get · iOS 16.0+

rawValue

TypeScript
getRawValue($self: UIHostingControllerSizingOptions): number
Swift declaration
let rawValue: Int

The raw value.

Skipped declarations

No declarations were skipped in this snapshot.

All SwiftUI types →