Alignment
public enum Alignment
Specifies the alignment behaviour of arranged subviews of a stack view along the perpendicular axis of the stack view’s orientation, i.e. the horizontal alignment of a vertical stack of views, and vice-versa for a vertical alignment of a horizontal stack of views.
-
Views are aligned to the leading edge of the view (either left, in horizontal orientations, or top, in vertical orientations). Views with an increased width or height requirements push the stack view’s bounds larger.
Declaration
Swift
case leading
-
Views are aligned to the trailing edge of the view (either right, in horizontal orientations, or bottom, in vertical orientations). Views with an increased width or height requirements push the stack view’s bounds larger.
Declaration
Swift
case trailing
-
Views are forced to match the span of the view with the highest content compression resistance or content hugging priority.
Declaration
Swift
case fill
-
Views increase the boundaries of the stack view, and views that are smaller than the minimal width or height are centered horizontally or vertically along the available space, perpendicular to the stack view’s orientation
Declaration
Swift
case centered