<!--
{
  "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

[`NSStackView.Distribution.equalCentering`](/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.

[`NSStackView.Distribution.equalSpacing`](/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.

[`NSStackView.Distribution.fill`](/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.

[`NSStackView.Distribution.fillEqually`](/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`.

[`NSStackView.Distribution.fillProportionally`](/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`.

[`NSStackView.Distribution.gravityAreas`](/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.



---

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)