Class
TextInputFormLayout
public final class TextInputFormLayout: NSObject, ComponentLayout
A layout used in forms for gathering text input from a user.
Relationships
Conforms To
ComponentLayout
A protocol to share components (view layouts) across different types.
NSObject
Properties
attributedTitle
public var attributedTitle: NSAttributedString?
The attributed title to display for the input field. Defaults to nil.
placeholder
public var placeholder: String
The placeholder to display in the input field when text hasn't been entered.
errorMessage
public var errorMessage: String?
An error message for the input. If this string is nil, a message won't be displayed, other it will be displayed when an error occurs in the input field. Defaults to nil.
helperMessage
public var helperMessage: String?
maxCharacters
public var maxCharacters: UInt
A max character count for the input. Default value is zero, which indicates unlimited characters.
inputMask
public var inputMask: Mask?
The input mask to apply to the textfield. Defaults to nil and won’t mask.
didBeginEditing
public var didBeginEditing: AnyPublisher<Void, Never>
A Publisher that is fired when the textfield becomes the first responder.
editingChanged
public var editingChanged: AnyPublisher<String?, Never>
A Publisher that is fired when the textfield text changes.
didEndEditing
public var didEndEditing: AnyPublisher<Void, Never>
A Publisher that is fired when the textfield resigns its first responder status.
valueSet
public var valueSet: AnyPublisher<Void, Never>
rightAccessoryViewSize
public var rightAccessoryViewSize: CGSize
rightAccessoryView
public var rightAccessoryView: UIView?
state
public var state: InputFieldState
Methods
layout(on:)
public func layout(on view: UIView)
setText(_:)
public func setText(_ text: String?)