UIStackViewAlignment UIStackViewAlignment Enum

Definition

Enumerates the ways in which a UIStackView can arrange its subviews.

[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 9, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.WatchOS, ObjCRuntime.PlatformArchitecture.All, null)]
public enum UIStackViewAlignment
type UIStackViewAlignment = 
Inheritance
UIStackViewAlignmentUIStackViewAlignment
Attributes

Fields

Bottom Bottom 4

Horizontal layout, bottom edges aligned to the bottom of the UIStackView.

Center Center 3

Views are aligned along the Axis, in the center of the UIStackView.

Fill Fill 0

Views are arranged to fill available space perpendicular to the Axis.

FirstBaseline FirstBaseline 2

Views are aligned based on the baseline of the first ArrangedSubviews. (Horizontal only.)

LastBaseline LastBaseline 5

Views are aligned based on the baseline of the last ArrangedSubviews. (Horizontal only.)

Leading Leading 1

Views are aligned based on the leading edge of the first ArrangedSubviews. (Vertical only.)

Top Top 1

Horizontal layout, top edges aligned to the top of the UIStackView.

Trailing Trailing 4

Views are aligned based on the trailing edge of the first ArrangedSubviews. (Vertical only.)

Remarks

AlignmentDescriptionExample Image
Bottom Horizontal layout, bottom edges aligned to the bottom of the UIStackView.
Center Views are aligned along the Axis, in the center of the UIStackView.
Fill Views are arranged to fill available space perpendicular to the Axis.
FirstBaseline Views are aligned based on the baseline of the first ArrangedSubviews. (Horizontal only.)
LastBaseline Views are aligned based on the baseline of the last ArrangedSubviews. (Horizontal only.)
Leading Views are aligned based on the leading edge of the first ArrangedSubviews. (Vertical only.)
Top Horizontal layout, top edges aligned to the top of the UIStackView.
Trailing Views are aligned based on the trailing edge of the first ArrangedSubviews. (Vertical only.)

Applies to