<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIStackView/Distribution-swift.enum/equalSpacing",
  "metadataVersion" : "0.1.0",
  "role" : "Case",
  "symbol" : {
    "kind" : "Case",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:@E@UIStackViewDistribution@UIStackViewDistributionEqualSpacing"
  },
  "title" : "UIStackView.Distribution.equalSpacing"
}
-->

# UIStackView.Distribution.equalSpacing

A layout where the stack view maintains equal spacing between adjacent views while preserving their intrinsic content size.

```
case equalSpacing
```

## Discussion

When the arranged views don’t fill the stack view, it pads the spacing between the views evenly. If the arranged views don’t fit within the stack view, it shrinks the views according to their compression resistance priority. If there’s any ambiguity, the stack view shrinks the views based on their index in the [`arrangedSubviews`](/documentation/UIKit/UIStackView/arrangedSubviews) array.

The following image shows an example of a horizontal stack view that uses the [`UIStackView.Distribution.equalSpacing`](/documentation/UIKit/UIStackView/Distribution-swift.enum/equalSpacing) distribution.

![A horizontal stack view with four arranged subviews. The stack view spaces the arranged views equally so that they fill the available space along the stack view’s axis.](images/com.apple.uikit/media-2557450@2x.png)

---

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)