Horizontal

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

    Parameters

    base

    Entity implements required behavior

    Return Value

    Initialized entity

  • Undocumented

    Declaration

    Swift

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

    Declaration

    Swift

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

    Parameters

    size

    Width limiter value.

    Return Value

    UpTo behavior typed with ‘Horizontal’

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

    Declaration

    Swift

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

    Parameters

    size

    Width limiter value

    Return Value

    From behavior typed with ‘Horizontal’

  • Provides rect with independed horizontal filling with fixed value

    Declaration

    Swift

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

    Parameters

    value

    Value of width

    Return Value

    Fixed behavior typed by ‘Horizontal’

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

    Declaration

    Swift

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

    Parameters

    scale

    Scale value.

    Return Value

    Scaled behavior typed by ‘Horizontal’

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

    Declaration

    Swift

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

    Parameters

    insets

    Value to use for adjusting the source rectangle

    Return Value

    Boxed behavior typed by ‘Horizontal’

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

    Declaration

    Swift

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

    Declaration

    Swift

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

    Parameters

    space

    Range valid width values

    Return Value

    Between behavior typed with ‘Horizontal’

Layout