<!--
{
  "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/Alignment-swift.enum",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:@E@UIStackViewAlignment"
  },
  "title" : "UIStackView.Alignment"
}
-->

# UIStackView.Alignment

The layout of arranged views perpendicular to the stack view’s axis.

```
enum Alignment
```

## Topics

### Constants

[`UIStackViewAlignmentFill`](/documentation/UIKit/UIStackView/Alignment-swift.enum/fill)

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

[`UIStackViewAlignmentCenter`](/documentation/UIKit/UIStackView/Alignment-swift.enum/center)

A layout where the stack view aligns the center of its arranged views with its center along its axis.

[`UIStackViewAlignmentLeading`](/documentation/UIKit/UIStackView/Alignment-swift.enum/leading)

A layout for vertical stacks where the stack view aligns the leading edge of its arranged views along its leading edge.

[`UIStackViewAlignmentTrailing`](/documentation/UIKit/UIStackView/Alignment-swift.enum/trailing)

A layout for vertical stacks where the stack view aligns the trailing edge of its arranged views along its trailing edge.

[`UIStackViewAlignmentTop`](/documentation/UIKit/UIStackView/Alignment-swift.enum/top)

A layout for horizontal stacks where the stack view aligns the top edge of its arranged views along its top edge.

[`UIStackViewAlignmentBottom`](/documentation/UIKit/UIStackView/Alignment-swift.enum/bottom)

A layout for horizontal stacks where the stack view aligns the bottom edge of its arranged views along its bottom edge.

[`UIStackViewAlignmentFirstBaseline`](/documentation/UIKit/UIStackView/Alignment-swift.enum/firstBaseline)

A layout for horizontal stacks where the stack view aligns its arranged views based on their first baseline.

[`UIStackViewAlignmentLastBaseline`](/documentation/UIKit/UIStackView/Alignment-swift.enum/lastBaseline)

A layout for horizontal stacks where the stack view aligns its arranged views based on their last baseline.

## Relationships

### Conforms To

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

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

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

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

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

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

---

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)