<!--
{
  "availability" : [
    "macOS: 10.11.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSStackView/Distribution-swift.enum",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:@E@NSStackViewDistribution"
  },
  "title" : "NSStackView.Distribution"
}
-->

# NSStackView.Distribution

```
enum Distribution
```

## Topics

### Constants

[`NSStackViewDistributionEqualCentering`](/documentation/AppKit/NSStackView/Distribution-swift.enum/equalCentering)

Equal center-to-center spacing of the items is maintained as much as possible while still maintaining the minimum spacing between each view.

[`NSStackViewDistributionEqualSpacing`](/documentation/AppKit/NSStackView/Distribution-swift.enum/equalSpacing)

The space separating stacked views along the stacking axis are maintained to be equal as much as possible while still maintaining the minimum spacing.

[`NSStackViewDistributionFill`](/documentation/AppKit/NSStackView/Distribution-swift.enum/fill)

The effective hugging priority in the stacking axis is `NSLayoutPriorityRequired`, causing the stacked views to tightly fill the container along the stacking axis.

[`NSStackViewDistributionFillEqually`](/documentation/AppKit/NSStackView/Distribution-swift.enum/fillEqually)

Stacked views will have sizes maintained to be equal as much as possible along the stacking axis. The effective hugging priority in the stacking axis is `NSLayoutPriorityRequired`.

[`NSStackViewDistributionFillProportionally`](/documentation/AppKit/NSStackView/Distribution-swift.enum/fillProportionally)

Stacked views will have sizes maintained to be equal, proportionally to their `intrinsicContentSize`s, as much as possible. The effective hugging priority in the stacking axis is `NSLayoutPriorityRequired`.

[`NSStackViewDistributionGravityAreas`](/documentation/AppKit/NSStackView/Distribution-swift.enum/gravityAreas)

Stacked views will not have any special distribution behavior, relying on behavior described by gravity areas and set hugging priorities along the stacking axis.

## Relationships

### Conforms To

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

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

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

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

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

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

---

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)