MaskTextFieldFormatter

public final class MaskTextFieldFormatter : NSObject
extension MaskTextFieldFormatter: MaskedTextFieldDelegateListener

Special formatter for input field with mask (work only with text field)

Properties

  • Error message for case, when user leave empty text field

    Declaration

    Swift

    public var emptyStringErrorMessage: String
  • Error message for case, when user leave incorrect text field

    Declaration

    Swift

    public var incorrectStringErrorMessage: String

Initialization

  • Undocumented

    Declaration

    Swift

    public convenience init(mask: String, delegate: MaskedTextFieldDelegate? = nil)
  • Undocumented

    Declaration

    Swift

    public init(mask: String, notations: [Notation], delegate: MaskedTextFieldDelegate? = nil)

Internal Methods

  • Method returns tuple with isValid flag and errorMessage, if current input state is incorrect

    Declaration

    Swift

    public func validate() -> (isValid: Bool, errorMessage: String?)
  • Method for formatting passed string with initial mask

    Declaration

    Swift

    public func format(string: String?, field: UITextField)
  • Method for formatting with current mask without field

    Declaration

    Swift

    public func format(string: String?) -> String?
  • Method returns object, which you must access to delegate property of needed UITextField

    Declaration

    Swift

    public func delegateForTextField() -> UITextFieldDelegate
  • Method for setting object as listener to provide processing callbacks of UITextFieldDelegate messages

    Declaration

    Swift

    public func setListenerToFormatter(listener: MaskedTextFieldDelegateListener)

MaskedTextFieldDelegateListener