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

# UIStackView.Distribution.fill

A layout where the stack view resizes its arranged views so that they fill the available space along the stack view’s axis.

```
case fill
```

## Discussion

When the arranged views don’t fit within the stack view, it shrinks the views according to their compression resistance priority. If the arranged views don’t fill the stack view, it stretches the views according to their hugging priority. If there’s any ambiguity, the stack view resizes the arranged 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.fill`](/documentation/UIKit/UIStackView/Distribution-swift.enum/fill) distribution.

![A horizontal stack view with four arranged subviews. The stack view resizes the width of one of the arranged views so that it fills the available space along the stack view’s axis.](images/com.apple.uikit/media-2557443@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)