<!--
{
  "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/equalCentering",
  "metadataVersion" : "0.1.0",
  "role" : "Case",
  "symbol" : {
    "kind" : "Case",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:@E@UIStackViewDistribution@UIStackViewDistributionEqualCentering"
  },
  "title" : "UIStackView.Distribution.equalCentering"
}
-->

# UIStackView.Distribution.equalCentering

A layout that attempts to position the arranged views with equal center-to-center spacing along the stack view’s axis, while maintaining the spacing property’s distance between views.

```
case equalCentering
```

## Discussion

If the arranged views don’t fit within the stack view, it shrinks the spacing until it reaches the minimum spacing defined by its [`spacing`](/documentation/UIKit/UIStackView/spacing) property. If the views still don’t fit, the stack view shrinks the arranged 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 with equal center-to-center spacing along the stack view’s axis.](images/com.apple.uikit/media-2557452@2x.png)

> Note:
> The stack view maintains the intrinsic content size of its arranged views at the expense of the center-to-center spacing. Similarly, it maintains the minimum spacing between views at the expense of the view’s intrinsic content size.

---

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)