Vertical

public struct Vertical : RectBasedLayout, Extensible
extension Layout.Alignment.Vertical: 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.Vertical

    Parameters

    base

    Entity implements required behavior

    Return Value

    Initialized entity

  • Undocumented

    Declaration

    Swift

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

    Declaration

    Swift

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

    Parameters

    offset

    Offset value. Positive value gives offset to bottom.

    Return Value

    Center alignment typed by ‘Vertical’

  • Vertical alignment by top of source rect

    Declaration

    Swift

    public static func top(_ offset: CGFloat = 0) -> Vertical

    Parameters

    offset

    Offset value. Positive value gives offset to bottom.

    Return Value

    Top alignment typed by ‘Vertical’

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

    Declaration

    Swift

    public static func top(multiplier: CGFloat) -> Vertical

    Parameters

    multiplier

    Multiplier value.

    Return Value

    Top aligment typed with ‘Vertical’

  • Vertical alignment by bottom of source rect

    Declaration

    Swift

    public static func bottom(_ offset: CGFloat = 0) -> Vertical

    Parameters

    offset

    Offset value. Positive value gives offset to top.

    Return Value

    Bottom alignment typed by ‘Vertical’

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

    Declaration

    Swift

    public static func bottom(multiplier: CGFloat) -> Vertical

    Parameters

    multiplier

    Multiplier value.

    Return Value

    Bottom aligment typed with ‘Vertical’

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

    Declaration

    Swift

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

    Declaration

    Swift

    public static func top(between space: ClosedRange<CGFloat>) -> Vertical

    Parameters

    space

    Range valid space values

    Return Value

    Between behavior typed with ‘Vertical’

  • Undocumented

    Declaration

    Swift

    public static func top(between space: Range<CGFloat>, step: CGFloat = 0.1) -> Vertical
  • Undocumented

    Declaration

    Swift

    public static func top(between space: ClosedRange<CGFloat>, step: CGFloat = 0.1) -> Vertical
  • See description: bottom(between space: ClosedRange<CGFloat>)

    Declaration

    Swift

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

    Declaration

    Swift

    public static func bottom(between space: ClosedRange<CGFloat>) -> Vertical

    Parameters

    space

    Range valid space values

    Return Value

    Between behavior typed with ‘Vertical’

Layout