ForagePANTextField
public class ForagePANTextField : UIView, Identifiable, ForageElement, ForageElementDelegate
extension ForagePANTextField : UITextFieldDelegate
-
Declaration
Swift
@IBInspectable public var isEmpty: Bool { get } -
Declaration
Swift
@IBInspectable public var isValid: Bool { get } -
Declaration
Swift
@IBInspectable public var isComplete: Bool { get } -
BorderWidth for the text field
Declaration
Swift
@IBInspectable public var borderWidth: CGFloat { get set } -
BorderColor for the text field
Declaration
Swift
@IBInspectable public var borderColor: UIColor? { get set } -
CornerRadius for the text field
Declaration
Swift
@IBInspectable public var cornerRadius: CGFloat { get set } -
MasksToBounds for the text field
Declaration
Swift
@IBInspectable public var masksToBounds: Bool { get set } -
Declaration
Swift
@IBInspectable public var padding: UIEdgeInsets { get set } -
Placeholder for the text field
Declaration
Swift
@IBInspectable public var placeholder: String? { get set } -
Text color for the text field
textColordefault value isblackDeclaration
Swift
@IBInspectable public var textColor: UIColor? { get set } -
Size of the text for the text field
sizedefault value is24Declaration
Swift
@IBInspectable public var size: Double { get set } -
Tint color for the text field
tfTintColordefault value isblackDeclaration
Swift
@IBInspectable public var tfTintColor: UIColor? { get set } -
Text alignment
textAlignmentdefault value isnaturalDeclaration
Swift
@IBInspectable public var textAlignment: NSTextAlignment { get set } -
Allow user to clear text field
clearButtonModedefault value isneverDeclaration
Swift
@IBInspectable public var clearButtonMode: UITextField.ViewMode { get set } -
Change UIFont
UITextFieldtext fontDeclaration
Swift
@IBInspectable public var font: UIFont? { get set } -
Declaration
Swift
@IBInspectable public var elementHeight: CGFloat { get set }
-
A delegate that informs the client about the state of the entered card number (validation, focus).
Declaration
Swift
public weak var delegate: ForageElementDelegate?
-
Declaration
Swift
override public func awakeFromNib()
-
Declaration
Swift
override public var intrinsicContentSize: CGSize { get } -
Declaration
Swift
public func setPlaceholderText(_ text: String) -
Declaration
Swift
public func clearText()
-
Declaration
Swift
public func focusDidChange(_ state: ObservableState) -
Declaration
Swift
public func textFieldDidChange(_ state: ObservableState) -
Declaration
Swift
public func textFieldDidBeginEditing(_ textField: UITextField) -
Declaration
Swift
public func textFieldDidEndEditing(_ textField: UITextField) -
Determines whether the text field should allow a change of characters within the specified range. This method is called when the user attempts to change the content of the text field.
Declaration
Swift
public func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString: String) -> BoolParameters
textFieldThe text field containing the text.
rangeThe range of characters to be replaced.
replacementStringThe replacement string.
Return Value
trueif the changes should be allowed; otherwise,false.
-
Make
ForagePANTextFieldfocused.Declaration
Swift
@discardableResult override public func becomeFirstResponder() -> Bool -
Remove focus from
ForagePANTextField.Declaration
Swift
@discardableResult override public func resignFirstResponder() -> Bool -
Check if
ForagePANTextFieldis focused.Declaration
Swift
override public var isFirstResponder: Bool { get }
ForagePANTextField Class Reference