Horizontal

public struct Horizontal : RectBasedLayout, Extensible
extension Layout.Alignment.Horizontal: ExpressibleByFloatLiteral, ExpressibleByIntegerLiteral

Undocumented

  • Undocumented

    Declaration

    Swift

    public typealias Conformed = RectBasedLayout
  • Performing layout of given rect inside available rect. Attention: Apply layout for view frame using code as layout(rect: &view.frame,…) has side effect and called setFrame method on view.

    Declaration

    Swift

    public func formLayout(rect: inout CGRect, in source: CGRect)

    Parameters

    rect

    Rect for layout

    source

    Available space for layout

  • Common method for create entity of this type with base behavior.

    Declaration

    Swift

    public static func build(_ base: RectBasedLayout) -> Layout.Alignment.Horizontal

    Parameters

    base

    Entity implements required behavior

    Return Value

    Initialized entity

  • Undocumented

    Declaration

    Swift

    public static var equal: Horizontal { get }
  • Horizontal alignment by center of source rect

    Declaration

    Swift

    public static func center(_ offset: CGFloat = 0) -> Horizontal

    Parameters

    offset

    Offset value. Positive value gives offset to right.

    Return Value

    Center alignment typed by Horizontal

  • Horizontal alignment by left of source rect

    Declaration

    Swift

    public static func left(_ offset: CGFloat = 0) -> Horizontal

    Parameters

    offset

    Offset value. Positive value gives offset to right.

    Return Value

    Left alignment typed by Horizontal

  • Provides rect with left alignment with spacing that depends on position calculated using multiplier

    Declaration

    Swift

    public static func left(multiplier: CGFloat) -> Horizontal

    Parameters

    multiplier

    Multiplier value.

    Return Value

    Left aligment typed with ‘Vertical’

  • Horizontal alignment by right of source rect

    Declaration

    Swift

    public static func right(_ offset: CGFloat = 0) -> Horizontal

    Parameters

    offset

    Offset value. Positive value gives offset to left.

    Return Value

    Right alignment typed by Horizontal

  • Provides rect with right alignment with spacing that depends on position calculated using multiplier

    Declaration

    Swift

    public static func right(multiplier: CGFloat) -> Horizontal

    Parameters

    multiplier

    Multiplier value.

    Return Value

    Right aligment typed with ‘Horizontal’

  • See description: left(between space: ClosedRange<CGFloat>)

    Declaration

    Swift

    public static func left(between space: Range<CGFloat>) -> Horizontal
  • Provides rect with left alignment and space between defined range depending on available space.

    Declaration

    Swift

    public static func left(between space: ClosedRange<CGFloat>) -> Horizontal

    Parameters

    space

    Range valid space values

    Return Value

    Between behavior typed with ‘Vertical’

  • See description: right(between space: ClosedRange<CGFloat>)

    Declaration

    Swift

    public static func right(between space: Range<CGFloat>) -> Horizontal
  • Provides rect with right alignment and space between defined range depending on available space.

    Declaration

    Swift

    public static func right(between space: ClosedRange<CGFloat>) -> Horizontal

    Parameters

    space

    Range valid space values

    Return Value

    Between behavior typed with ‘Horizontal’

  • Undocumented

    Declaration

    Swift

    public static func trailing(_ offset: CGFloat = 0) -> Horizontal
  • Undocumented

    Declaration

    Swift

    public static func leading(_ offset: CGFloat = 0) -> Horizontal

Layout