<!--
{
  "availability" : [
    "macOS: 13.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/NSHostingSizingOptions",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI22NSHostingSizingOptionsV"
  },
  "title" : "NSHostingSizingOptions"
}
-->

# NSHostingSizingOptions

Options for how hosting views and controllers reflect their
content’s size into Auto Layout constraints.

```
struct NSHostingSizingOptions
```

## Topics

### Geting sizing options

[`static let intrinsicContentSize: NSHostingSizingOptions`](/documentation/SwiftUI/NSHostingSizingOptions/intrinsicContentSize)

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

[`static let maxSize: NSHostingSizingOptions`](/documentation/SwiftUI/NSHostingSizingOptions/maxSize)

The hosting view creates and updates constraints that represent its
content’s maximum size.

[`static let minSize: NSHostingSizingOptions`](/documentation/SwiftUI/NSHostingSizingOptions/minSize)

The hosting view creates and updates constraints that represent its
content’s minimum size.

[`static let preferredContentSize: NSHostingSizingOptions`](/documentation/SwiftUI/NSHostingSizingOptions/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`.

[`static let standardBounds: NSHostingSizingOptions`](/documentation/SwiftUI/NSHostingSizingOptions/standardBounds)

The hosting view creates constraints for its minimum, ideal, and maximum
sizes.

### Creating a sizing option

[`init(rawValue: Int)`](/documentation/SwiftUI/NSHostingSizingOptions/init(rawValue:))

Creates a new options from a raw value.

[`let rawValue: Int`](/documentation/SwiftUI/NSHostingSizingOptions/rawValue)

The raw value.

## Relationships

### Conforms To

[`Sendable`](/documentation/Swift/Sendable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`ExpressibleByArrayLiteral`](/documentation/Swift/ExpressibleByArrayLiteral)

[`SetAlgebra`](/documentation/Swift/SetAlgebra)

[`Equatable`](/documentation/Swift/Equatable)

[`RawRepresentable`](/documentation/Swift/RawRepresentable)

[`OptionSet`](/documentation/Swift/OptionSet)

---

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)