UnderlinedTextField
open class UnderlinedTextField : InnerDesignableView, ResetableField, RespondableField
extension UnderlinedTextField: UITextFieldDelegate
extension UnderlinedTextField: MaskedTextFieldDelegateListener
extension UnderlinedTextField: GuidedTextField
extension UnderlinedTextField: DateTextField
extension UnderlinedTextField: PickerTextField
Class for custom textField. Contains UITextFiled, top floating placeholder, underline line under textField and bottom label with some info. Standart height equals 77.
-
Undocumented
Declaration
Swift
open var maxLength: Int?
-
Undocumented
Declaration
Swift
public var field: InnerTextField { get }
-
Undocumented
Declaration
Swift
public var text: String { get set }
-
Property allows you to install placeholder into the first placeholder service. If you will use more than one service - install placeholder to it manually. Getter returns only nil value.
Declaration
Swift
public var placeholder: String? { get set }
-
Undocumented
Declaration
Swift
public var configuration: UnderlinedTextFieldConfiguration { get set }
-
Undocumented
Declaration
Swift
public var validator: TextFieldValidation?
-
Undocumented
Declaration
Swift
public var maskFormatter: MaskTextFieldFormatter? { get set }
-
Undocumented
Declaration
Swift
public var toolbar: ToolBarInterface? { get set }
-
Undocumented
Declaration
Swift
public var hideOnReturn: Bool
-
Undocumented
Declaration
Swift
public var validateWithFormatter: Bool
-
Undocumented
Declaration
Swift
public var validationPolicy: ValidationPolicy
-
Undocumented
Declaration
Swift
public var pasteOverflowPolicy: PasteOverflowPolicy
-
Undocumented
Declaration
Swift
public var trimSpaces: Bool
-
Undocumented
Declaration
Swift
public var allowedCharacterSet: CharacterSet?
-
Used when
allowedCharacterSet
is filled. Iftrue
removes all not allowed charecters from paste string. Iffalse
does not paste anything into field.Declaration
Swift
public var pasteAllowedChars: Bool
-
Undocumented
Declaration
Swift
public var heightLayoutPolicy: HeightLayoutPolicy
-
Undocumented
Declaration
Swift
public var mode: TextFieldMode { get set }
-
Undocumented
Declaration
Swift
public var isEnabled: Bool { get set }
-
Undocumented
Declaration
Swift
public var isValid: Bool { get }
-
Undocumented
Declaration
Swift
public var onShouldBeginEditing: ((UnderlinedTextField) -> Bool)?
-
Undocumented
Declaration
Swift
public var onBeginEditing: ((UnderlinedTextField) -> Void)?
-
Undocumented
Declaration
Swift
public var onEndEditing: ((UnderlinedTextField) -> Void)?
-
Undocumented
Declaration
Swift
public var onTextChanged: ((UnderlinedTextField) -> Void)?
-
Undocumented
Declaration
Swift
public var onShouldReturn: ((UnderlinedTextField) -> Void)?
-
Undocumented
Declaration
Swift
public var onActionButtonTap: ((UnderlinedTextField, UIButton) -> Void)?
-
Undocumented
Declaration
Swift
public var onValidateFail: ((UnderlinedTextField) -> Void)?
-
Undocumented
Declaration
Swift
public var onHeightChanged: ((CGFloat) -> Void)?
-
Undocumented
Declaration
Swift
public var onDateChanged: ((Date) -> Void)?
-
Undocumented
Declaration
Swift
public var onContainerStateChanged: ((FieldContainerState) -> Void)?
-
Undocumented
Declaration
Swift
override public init(frame: CGRect)
-
Undocumented
Declaration
Swift
required public init?(coder aDecoder: NSCoder)
-
Undocumented
Declaration
Swift
override open func awakeFromNib()
-
Undocumented
Declaration
Swift
override open func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?)
-
Undocumented
Declaration
Swift
override open func draw(_ rect: CGRect)
-
Undocumented
Declaration
Swift
override open var intrinsicContentSize: CGSize { get }
-
Declaration
Swift
public var nextInput: UIResponder? { get set }
-
Declaration
Swift
public var previousInput: UIResponder? { get set }
-
Declaration
Swift
open override var isFirstResponder: Bool { get }
-
Declaration
Swift
open override func becomeFirstResponder() -> Bool
-
Declaration
Swift
open override var canBecomeFirstResponder: Bool { get }
-
Allows you to change placeholder services for text field
Declaration
Swift
public func setup(placeholderServices: [AbstractPlaceholderService])
-
Allows you to add new placeholder service
Declaration
Swift
public func add(placeholderService service: AbstractPlaceholderService)
-
Allows you to change default hint service
Declaration
Swift
public func setup(hintService: AbstractHintService)
-
Allows you to set some string as hint message
Declaration
Swift
public func setup(hint: String)
-
Allows you to refresh set of states, when hint message or error message should be visible
Declaration
Swift
public func setup(visibleHintStates: HintVisibleStates)
-
Allows you to set optional string as text.
Declaration
Swift
public func setup(text: String?, animated: Bool = true, ignoreFormatter: Bool = false, validateText: Bool = true)
Parameters
text
text for setup
animated
allows you to process action with/without animation
ignoreFormatter
allows you apply format from
maskFormatter
or ignore it, false by defaultvalidateText
allows you disable automatic text validation on this action, true by default
-
Allows you to disable one or more edit actions By default all actions are enabled Set .all to disable all actions Set nil to enable all actions after the disable has been applied
Declaration
Swift
public func disable(editActions: [StandardEditActions]?)
-
Allows to set accessibilityIdentifier for textField and its internal elements
Declaration
Swift
public func setTextFieldIdentifier(_ identifier: String)
-
Allows to set view in ‘error’ state, optionally allows you to set the error message. If errorMessage is nil - label keeps the previous info message
Declaration
Swift
public func setError(with errorMessage: String?, animated: Bool)
-
Method performs validate logic, updates all UI elements and returns you
isValid
valueDeclaration
Swift
@discardableResult public func validate(force: Bool = false) -> Bool
-
Clear text, reset error and update all UI elements - reset to default state
Declaration
Swift
public func reset(animated: Bool)
-
Reset only error state and update all UI elements
Declaration
Swift
public func resetErrorState(animated: Bool = true)
-
Allows you to change base height for view (inner property with last value of height), recommend to call before working with field
Declaration
Swift
public func updateBaseHeight(_ height: CGFloat)
-
Undocumented
Declaration
Swift
@objc open func textfieldEditingChange(_ textField: UITextField)
-
Undocumented
Declaration
Swift
open func textFieldShouldBeginEditing(_ textField: UITextField) -> Bool
-
Undocumented
Declaration
Swift
open func textFieldDidBeginEditing(_ textField: UITextField)
-
Undocumented
Declaration
Swift
open func textFieldShouldEndEditing(_ textField: UITextField) -> Bool
-
Undocumented
Declaration
Swift
open func textFieldDidEndEditing(_ textField: UITextField, reason: UITextField.DidEndEditingReason)
-
Undocumented
Declaration
Swift
open func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool
-
Undocumented
Declaration
Swift
open func textFieldShouldReturn(_ textField: UITextField) -> Bool
-
Declaration
Swift
open func textField(_ textField: UITextField, didFillMandatoryCharacters complete: Bool, didExtractValue value: String)
-
Undocumented
Declaration
Swift
public var havePreviousInput: Bool { get }
-
Undocumented
Declaration
Swift
public var haveNextInput: Bool { get }
-
Undocumented
Declaration
Swift
public func processReturnAction()
-
Undocumented
Declaration
Swift
public func switchToPreviousInput()
-
Undocumented
Declaration
Swift
public func switchToNextInput()
-
Undocumented
Declaration
Swift
public func processDateChange(_ date: Date, text: String)
-
Undocumented
Declaration
Swift
public func processValueChange(_ value: String)