HorizontalAlignment

public enum HorizontalAlignment : Equatable, CaseIterable

Controls where on the screen an automatically-sized view controller is placed horizontally.

  • Aligns the view to the leading edge of the container.

    Declaration

    Swift

    case leading
  • Centers the view horizontally inside the container.

    Declaration

    Swift

    case center
  • Aligns the view to the trailing edge of the container.

    Declaration

    Swift

    case trailing
  • Aligns the view to the left edge of the container.

    Available for legacy layouts; use of leading is preferred.

    Declaration

    Swift

    case left
  • Aligns the view to the right edge of the container.

    Available for legacy layouts; use of trailing is preferred.

    Declaration

    Swift

    case right