Alignment

public struct Alignment

Specifies how a layout positions itself inside of the rect that it is given to it by its parent during arrangement.

  • Undocumented

    Declaration

    Swift

    public struct Alignment
  • A function that aligns size in rect.

    Declaration

    Swift

    public typealias Aligner = (_ size: CGSize, _ rect: CGRect) -> CGRect
  • Undocumented

    Declaration

    Swift

    public struct Alignment
  • Undocumented

    Declaration

    Swift

    public struct Alignment
  • Undocumented

    Declaration

    Swift

    public struct Alignment
  • Undocumented

    Declaration

    Swift

    public struct Alignment
  • Undocumented

    Declaration

    Swift

    public struct Alignment
  • Undocumented

    Declaration

    Swift

    public struct Alignment
  • Undocumented

    Declaration

    Swift

    public struct Alignment
  • Undocumented

    Declaration

    Swift

    public struct Alignment
  • Undocumented

    Declaration

    Swift

    public struct Alignment
  • Undocumented

    Declaration

    Swift

    public struct Alignment
  • Undocumented

    Declaration

    Swift

    public struct Alignment
  • Undocumented

    Declaration

    Swift

    public struct Alignment
  • Undocumented

    Declaration

    Swift

    public struct Alignment
  • Scales down a size to fit inside of a rect while maintaining the original aspect ratio. The scaled down size is then centered in the available space.

    Declaration

    Swift

    public static let aspectFit = Alignment(aligner: { (size: CGSize, rect: CGRect) -> CGRect in
  • Alignment behavior along the vertical dimension.

    See more

    Declaration

    Swift

    public enum Vertical
  • Alignment behavior along the horizontal dimension.

    See more

    Declaration

    Swift

    public enum Horizontal
  • Undocumented

    Declaration

    Swift

    public struct Alignment
  • Undocumented

    Declaration

    Swift

    public struct Alignment
  • Positions a rect of the given size inside the given rect using the alignment spec.

    Declaration

    Swift

    public func position(size: CGSize, in rect: CGRect) -> CGRect