EntryField
public class EntryField : Field, UIGestureRecognizerDelegate
Material version of the UITextField (single line, for multiline capability use the AreaField
class)
-
Declaration
Swift
public override var placeholder: String? { get set }
-
The string value of the field
Declaration
Swift
override public var text: String? { get set }
-
Optional unit label that shows up on the right hand side of the field
Declaration
Swift
public var unit: String? { get set }
-
Optional setter to show a dollar sign on the left hand side of the field
Declaration
Swift
public var isMonetary: Bool { get set }
-
Declaration
Swift
public override var isOptional: Bool { get set }
-
Declaration
Swift
public override var keyboardType: UIKeyboardType { get set }
-
Declaration
Swift
public override var autocapitalizationType: UITextAutocapitalizationType { get set }
-
Declaration
Swift
public override var autocorrectionType: UITextAutocorrectionType { get set }
-
Declaration
Swift
public override var isSecureTextEntry: Bool { get set }
-
Declaration
Swift
public override var borderColor: UIColor { get set }
-
Declaration
Swift
public override var borderHighlightColor: UIColor { get set }
-
Declaration
Swift
public override var borderErrorColor: UIColor { get set }
-
Declaration
Swift
public override var textColor: UIColor { get set }
-
Declaration
Swift
public override var errorTextColor: UIColor { get set }
-
Declaration
Swift
public override var placeholderDownColor: UIColor { get set }
-
Declaration
Swift
public override var placeholderUpColor: UIColor { get set }
-
Declaration
Swift
public override var cursorColor: UIColor { get set }
-
Color of the dollar sign if the field is monetary
Note
Defualts to UIColor.lightGrayDeclaration
Swift
public var monetaryColor: UIColor { get set }
-
Color of the unit label if the field has a unit label
Note
Defualts to UIColor.lightGrayDeclaration
Swift
public var unitColor: UIColor { get set }
-
The reciever’s delegate
Declaration
Swift
weak public var delegate: EntryFieldDelegate?
-
Required initializer if doing programtically. You can manually set the frame after initialization. Otherwise it relies on auto layout and its intrinsic content size.
Warning
Refer to the Field Guide in the online documentation if you want to define height constraints.Declaration
Swift
public required init()
-
Declaration
Swift
override public func setError(withText text: String?)
-
Declaration
Swift
public override func removeErrorUI()
-
Notifies the field that it has been asked to relinquish its status as first responder in its window. This triggers the end callback from the field, closes the keyboard, and removes the editing state.
Note
If it’s in an error state it will keep its error UI.Declaration
Swift
override public func resignFirstResponder() -> Bool
Return Value
true
-
Asks UIKit to make the field the first responder in its window.
Declaration
Swift
override public func becomeFirstResponder() -> Bool
Return Value
true if became first responder, false otherwise
-
Asks UIKit to make the EntryField is the first responder. Returns true if it becomes the first responder, false otherwise.
Declaration
Swift
override public var isFirstResponder: Bool { get }
-
Returns a boolean indicating wether the EntryField can become the first responder
Declaration
Swift
public override var canBecomeFirstResponder: Bool { get }
-
Forwards to entryFieldShouldBeginEditing
Declaration
Swift
public func textFieldShouldBeginEditing(_ textField: UITextField) -> Bool
-
Forwards to entryFieldDidBeginEditing, handles state UI
Declaration
Swift
public func textFieldDidBeginEditing(_ textField: UITextField)
-
Forwards to entryFieldShouldEndEditing
Declaration
Swift
public func textFieldShouldEndEditing(_ textField: UITextField) -> Bool
-
Forwards to entryFieldDidEndEditing, handles state UI
Declaration
Swift
public func textFieldDidEndEditing(_ textField: UITextField)
-
Forwards to entryFieldShouldReturn
Declaration
Swift
public func textFieldShouldReturn(_ textField: UITextField) -> Bool
-
Forwards to entryFieldShouldClear
Declaration
Swift
public func textFieldShouldClear(_ textField: UITextField) -> Bool