Input

@objcMembers public final class Input : NSObject

Class representing an input (value, statement, or dummy). To create an Input object, use InputBuilder

  • Represents types of inputs.

    Declaration

    Swift

    public enum InputType: Int
  • Represents valid alignments of a connection’s fields.

    Declaration

    Swift

    public enum Alignment: Int
  • The type (value, statement, dummy) of the input.

    Declaration

    Swift

    public let type: InputType
  • The name of the input.

    Declaration

    Swift

    public let name: String
  • A list of Field objects for the input.

    Declaration

    Swift

    public private(set) var fields: [Field]
  • The Block that owns this input.

    Declaration

    Swift

    public internal(set) weak var sourceBlock: Block?
  • The connection for this input, if required.

    Declaration

    Swift

    public fileprivate(set) var connection: Connection?
  • The block that is connected to this input, if it exists.

    Declaration

    Swift

    public var connectedBlock: Block?
  • The shadow block that is connected to this input, if it exists

    Declaration

    Swift

    public var connectedShadowBlock: Block?
  • true if the input is visible, false otherwise. Defaults to true.

    Declaration

    Swift

    public var visible: Bool = true
  • The alignment of the input

    Declaration

    Swift

    public var alignment: Alignment = Alignment.left
  • The layout associated with this input.

    Declaration

    Swift

    public weak var layout: InputLayout?
  • Append a field to the end of self.fields.

    Declaration

    Swift

    public func appendField(_ field: Field)
  • Insert a field at the specified position.

    Declaration

    Swift

    public func insertField(_ field: Field, at index: Int)
  • Remove a field from the input. If the field doesn’t exist, nothing happens.

    Declaration

    Swift

    public func removeField(_ field: Field)