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 } -
UIEdgeInsetsfor 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.neverDeclaration
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
VGSTextFieldshould automatically update its font when the device’sUIContentSizeCategoryis 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
VGSTextFieldconfiguration parameters to work withVGSCollect.Declaration
Swift
@MainActor public var configuration: VGSConfiguration? { get set } -
Delegates
VGSTextFieldediting events. Default isnil.Declaration
Swift
@MainActor public weak var delegate: VGSTextFieldDelegate?
-
Set textfield default text.
Note
This will not changeState.isDirtyattribute.- 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
-
VGSTextFieldtext fontDeclaration
Swift
@MainActor var font: UIFont? { get set } -
VGSTextFieldtext colorDeclaration
Swift
@IBInspectable @MainActor var textColor: UIColor? { get set }
-
VGSTextFieldlayer corner radiusDeclaration
Swift
@IBInspectable @MainActor var cornerRadius: CGFloat { get set } -
VGSTextFieldlayer borderWidthDeclaration
Swift
@IBInspectable @MainActor var borderWidth: CGFloat { get set } -
VGSTextFieldlayer borderColorDeclaration
Swift
@IBInspectable @MainActor var borderColor: UIColor? { get set } -
VGSTextFieldStatePublisherpublisher that emits theStateof a givenVGSTextField.Declaration
Swift
@MainActor var statePublisher: VGSTextFieldStatePublisher { get }
-
Make
VGSTextFieldfocused.Declaration
Swift
@discardableResult @MainActor override public func becomeFirstResponder() -> Bool -
Remove focus from
VGSTextField.Declaration
Swift
@discardableResult @MainActor override public func resignFirstResponder() -> Bool -
Check if
VGSTextFieldis focused.Declaration
Swift
@MainActor override public var isFirstResponder: Bool { get }
View on GitHub