VGSTextField
public class VGSTextField : UIView
extension VGSTextField: UITextFieldDelegate
An object that displays an editable text area in user interface.
-
Textfield placeholder string.
Declaration
Swift
public var placeholder: String? { get set }
-
Textfield autocapitalization type. Default is
.sentences
.Declaration
Swift
public var autocapitalizationType: UITextAutocapitalizationType { get set }
-
Textfield spell checking type. Default is
UITextSpellCheckingType.default
.Declaration
Swift
public var spellCheckingType: UITextSpellCheckingType { get set }
-
Textfield attributedPlaceholder string.
Declaration
Swift
public var attributedPlaceholder: NSAttributedString? { get set }
-
The natural size for the Textfield, considering only properties of the view itself.
Declaration
Swift
public override var intrinsicContentSize: CGSize { get }
-
UIEdgeInsets
for text and placeholder insideVGSTextField
.Declaration
Swift
public var padding: UIEdgeInsets { get set }
-
The technique to use for aligning the text.
Declaration
Swift
public var textAlignment: NSTextAlignment { get set }
-
Sets when the clear button shows up. Default is
UITextField.ViewMode.never
Declaration
Swift
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
public var isSecureTextEntry: Bool { get set }
-
Indicates whether
VGSTextField
should automatically update its font when the device’sUIContentSizeCategory
is changed.Declaration
Swift
public var adjustsFontForContentSizeCategory: Bool { get set }
-
Input Accessory View
Declaration
Swift
public var keyboardAccessoryView: UIView? { get set }
-
Determines whether autocorrection is enabled or disabled during typing.
Declaration
Swift
public var autocorrectionType: UITextAutocorrectionType { get set }
-
A succinct label in a localized string that identifies the accessibility text field.
Declaration
Swift
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
public var textFieldAccessibilityHint: String? { get set }
-
Boolean value that determinates if the text field should be exposed as an accesibility element.
Declaration
Swift
public var textFieldIsAccessibilityElement: Bool { get set }
-
Specifies
VGSTextField
configuration parameters to work withVGSCollect
.Declaration
Swift
public var configuration: VGSConfiguration? { get set }
-
Delegates
VGSTextField
editing events. Default isnil
.Declaration
Swift
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
public func setDefaultText(_ text: String?)
-
Removes input from field.
Declaration
Swift
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
public func isContentEqual(_ textField: VGSTextField) -> Bool
-
VGSTextField
text fontDeclaration
Swift
var font: UIFont? { get set }
-
VGSTextField
text colorDeclaration
Swift
@IBInspectable var textColor: UIColor? { get set }
-
VGSTextField
layer corner radiusDeclaration
Swift
@IBInspectable var cornerRadius: CGFloat { get set }
-
VGSTextField
layer borderWidthDeclaration
Swift
@IBInspectable var borderWidth: CGFloat { get set }
-
VGSTextField
layer borderColorDeclaration
Swift
@IBInspectable var borderColor: UIColor? { get set }
-
VGSTextFieldStatePublisher
publisher that emits theState
of a givenVGSTextField
.Declaration
Swift
var statePublisher: VGSTextFieldStatePublisher { get }
-
Make
VGSTextField
focused.Declaration
Swift
@discardableResult override public func becomeFirstResponder() -> Bool
-
Remove focus from
VGSTextField
.Declaration
Swift
@discardableResult override public func resignFirstResponder() -> Bool
-
Check if
VGSTextField
is focused.Declaration
Swift
override public var isFirstResponder: Bool { get }