CreationKit Documentation

Class Text​Input​Form​Layout

public final class TextInputFormLayout: NSObject, ComponentLayout  

A layout used in forms for gathering text input from a user.

TextInputFormLayout TextInputFormLayout ComponentLayout ComponentLayout TextInputFormLayout->ComponentLayout NSObject NSObject TextInputFormLayout->NSObject

Conforms To

ComponentLayout

A protocol to share components (view layouts) across different types.

NSObject

Properties

title

public var title: String?  

The title to display for the input field. Defaults to nil.

attributed​Title

public var attributedTitle: NSAttributedString?  

The attributed title to display for the input field. Defaults to nil.

subtitle

public var subtitle: String?  

The subtitle to display for the input field. Defaults to nil.

text

public var text: String?  

The text in the input field.

placeholder

public var placeholder: String  

The placeholder to display in the input field when text hasn't been entered.

error​Message

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.

helper​Message

public var helperMessage: String?  

max​Characters

public var maxCharacters: UInt  

A max character count for the input. Default value is zero, which indicates unlimited characters.

input​Mask

public var inputMask: Mask?  

The input mask to apply to the textfield. Defaults to nil and won’t mask.

keyboard​Type

public var keyboardType: UIKeyboardType  

The keyboard type

did​Begin​Editing

public var didBeginEditing: AnyPublisher<Void, Never>  

A Publisher that is fired when the textfield becomes the first responder.

editing​Changed

public var editingChanged: AnyPublisher<String?, Never>  

A Publisher that is fired when the textfield text changes.

did​End​Editing

public var didEndEditing: AnyPublisher<Void, Never>  

A Publisher that is fired when the textfield resigns its first responder status.

value​Set

public var valueSet: AnyPublisher<Void, Never>  

right​Accessory​View​Size

public var rightAccessoryViewSize: CGSize  

right​Accessory​View

public var rightAccessoryView: UIView?  

state

public var state: InputFieldState  

Methods

layout(on:​)

public func layout(on view: UIView)  

set​Text(_:​)

public func setText(_ text: String?)