VGSTextField
@MainActor
public class VGSTextField : UIView
extension VGSTextField: UITextFieldDelegate
extension VGSTextField: @preconcurrency MaskedTextFieldDelegate
An object that displays an editable text area in user interface.
-
Textfield placeholder string.
Declaration
Swift
@MainActor public var placeholder: String? { get set }
-
Textfield autocapitalization type. Default is
.sentences
.Declaration
Swift
@MainActor public var autocapitalizationType: UITextAutocapitalizationType { get set }
-
Textfield spell checking type. Default is
UITextSpellCheckingType.default
.Declaration
Swift
@MainActor public var spellCheckingType: UITextSpellCheckingType { get set }
-
Textfield attributedPlaceholder string.
Declaration
Swift
@MainActor public var attributedPlaceholder: NSAttributedString? { get set }
-
The natural size for the Textfield, considering only properties of the view itself.
Declaration
Swift
@MainActor public override var intrinsicContentSize: CGSize { get }
-
UIEdgeInsets
for text and placeholder insideVGSTextField
.Declaration
Swift
@MainActor public var padding: UIEdgeInsets { get set }
-
The technique to use for aligning the text.
Declaration
Swift
@MainActor public var textAlignment: NSTextAlignment { get set }
-
Sets when the clear button shows up. Default is
UITextField.ViewMode.never
Declaration
Swift
@MainActor public var clearButtonMode: UITextField.ViewMode { get set }
-
Identifies whether the text object should disable text copying and in some cases hide the text being entered. Default is false.
Declaration
Swift
@MainActor public var isSecureTextEntry: Bool { get set }
-
Indicates whether
VGSTextField
should automatically update its font when the device’sUIContentSizeCategory
is changed.Declaration
Swift
@MainActor public var adjustsFontForContentSizeCategory: Bool { get set }
-
Input Accessory View
Declaration
Swift
@MainActor public var keyboardAccessoryView: UIView? { get set }
-
Determines whether autocorrection is enabled or disabled during typing.
Declaration
Swift
@MainActor public var autocorrectionType: UITextAutocorrectionType { get set }
-
A succinct label in a localized string that identifies the accessibility text field.
Declaration
Swift
@MainActor public var textFieldAccessibilityLabel: String? { get set }
-
A localized string that contains a brief description of the result of performing an action on the accessibility text field.
Declaration
Swift
@MainActor public var textFieldAccessibilityHint: String? { get set }
-
Boolean value that determinates if the text field should be exposed as an accesibility element.
Declaration
Swift
@MainActor public var textFieldIsAccessibilityElement: Bool { get set }
-
Specifies
VGSTextField
configuration parameters to work withVGSCollect
.Declaration
Swift
@MainActor public var configuration: VGSConfiguration? { get set }
-
Delegates
VGSTextField
editing events. Default isnil
.Declaration
Swift
@MainActor public weak var delegate: VGSTextFieldDelegate?
-
Set textfield default text.
Note
This will not changeState.isDirty
attribute.- Discussion: probably you should want to set field configuration before setting default value, so the input format will be update as required.
Declaration
Swift
@MainActor public func setDefaultText(_ text: String?)
-
Removes input from field.
Declaration
Swift
@MainActor public func cleanText()
-
Check if input text in two textfields is same. Returns
Bool
.Note
Result will be based on raw text, mask and dividers will be ignored.Declaration
Swift
@MainActor public func isContentEqual(_ textField: VGSTextField) -> Bool
-
VGSTextField
text fontDeclaration
Swift
@MainActor var font: UIFont? { get set }
-
VGSTextField
text colorDeclaration
Swift
@IBInspectable @MainActor var textColor: UIColor? { get set }
-
VGSTextField
layer corner radiusDeclaration
Swift
@IBInspectable @MainActor var cornerRadius: CGFloat { get set }
-
VGSTextField
layer borderWidthDeclaration
Swift
@IBInspectable @MainActor var borderWidth: CGFloat { get set }
-
VGSTextField
layer borderColorDeclaration
Swift
@IBInspectable @MainActor var borderColor: UIColor? { get set }
-
VGSTextFieldStatePublisher
publisher that emits theState
of a givenVGSTextField
.Declaration
Swift
@MainActor var statePublisher: VGSTextFieldStatePublisher { get }
-
Make
VGSTextField
focused.Declaration
Swift
@discardableResult @MainActor override public func becomeFirstResponder() -> Bool
-
Remove focus from
VGSTextField
.Declaration
Swift
@discardableResult @MainActor override public func resignFirstResponder() -> Bool
-
Check if
VGSTextField
is focused.Declaration
Swift
@MainActor override public var isFirstResponder: Bool { get }