Vertical

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

    Parameters

    base

    Entity implements required behavior

    Return Value

    Initialized entity

  • Undocumented

    Declaration

    Swift

    public static var equal: Vertical { get }
  • Provides rect with height less or equal defined size depending on available space.

    Declaration

    Swift

    public static func upTo(_ size: CGFloat) -> Vertical

    Parameters

    size

    Height limiter value.

    Return Value

    UpTo behavior typed with ‘Vertical’

  • Provides rect with height value more or equal defined size depending on available space.

    Declaration

    Swift

    public static func from(_ size: CGFloat) -> Vertical

    Parameters

    size

    Height limiter value

    Return Value

    From behavior typed with ‘Vertical’

  • Provides rect with independed vertical filling with fixed value

    Declaration

    Swift

    public static func fixed(_ value: CGFloat) -> Vertical

    Parameters

    value

    Value of height

    Return Value

    Fixed behavior typed by ‘Vertical’

  • Provides rect with height value scaled from height of source rect

    Declaration

    Swift

    public static func scaled(_ scale: CGFloat) -> Vertical

    Parameters

    scale

    Scale value.

    Return Value

    Scaled behavior typed by ‘Vertical’

  • Provides rect, that height is smaller or larger than the source rect, with the same center point.

    Declaration

    Swift

    public static func boxed(_ insets: CGFloat) -> Vertical

    Parameters

    insets

    Value to use for adjusting the source rectangle

    Return Value

    Boxed behavior typed by ‘Vertical’

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

    Declaration

    Swift

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

    Declaration

    Swift

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

    Parameters

    space

    Range valid height values

    Return Value

    Between behavior typed with ‘Vertical’

Layout