InputLayout

@objcMembers open class InputLayout: Layout

Abstract class for storing information on how to render and position an Input on-screen.

  • The target Input to layout

    Declaration

    Swift

    public final let input: Input
  • Convenience property returning self.parentLayout as a BlockLayout

    Declaration

    Swift

    public final var parentBlockLayout: BlockLayout?
  • The corresponding BlockGroupLayout object seeded by self.input.connectedBlock.

    Declaration

    Swift

    public fileprivate(set) final var blockGroupLayout: BlockGroupLayout!
  • The corresponding layouts for self.input.fields[]

    Declaration

    Swift

    public fileprivate(set) final var fieldLayouts = [FieldLayout]()
  • The line height of the first line in the input layout, specified as a Workspace coordinate system unit. It is used for vertical alignment purposes and should be updated during performLayout(includeChildren:).

    Declaration

    Swift

    open var firstLineHeight: CGFloat = 0
  • Flag for if this input is the first child in its parent’s block layout

    Declaration

    Swift

    open var isFirstChild: Bool
  • Flag for if this input is the last child in its parent’s block layout

    Declaration

    Swift

    open var isLastChild: Bool
  • Appends a fieldLayout to self.fieldLayouts and sets its parentLayout to this instance.

    Declaration

    Swift

    open func appendFieldLayout(_ fieldLayout: FieldLayout)
  • Removes self.fieldLayouts[index], sets its parentLayout to nil, and returns it.

    Declaration

    Swift

    open func removeFieldLayout(atIndex index: Int) -> FieldLayout

    Return Value

    The FieldLayout that was removed.

  • Removes all elements from self.fieldLayouts, sets their parentLayout to nil, and resets self.blockGroupLayout.

    Declaration

    Swift

    open func reset(updateLayout: Bool)