SwiftMaskTextfield 1.1.0

SwiftMaskTextfield 1.1.0

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release May 2019
SPMSupports SPM

Maintained by Gabriel Maccori Kozma.



SwiftMaskTextfield

SwiftMaskTextfield inherits from UITextField for supporting masks into textfields that can be defined into the storyboard

  • Lightweight implementation
  • Can be used with or without masks
  • Ability to override de formatting function to create custom implemantion of the class
  • The replaceable characters from the mask format can be changed by overriding them
  • Supports spaces, dots and any special chars on the format, for instance: "####.### ###"

How to use

  • Install with cocoapods or copy the class SwiftMaskTextfield into your project
  • Add a UITextfield component into your storyboard or xib
  • Set it's custom class to SwiftMaskTextfield
  • Set the formatting mask into the property formatPattern in Interface Builder or programattically
Characters Format replacement
letters and digits *
any letter @
lowercase letters a
uppercase letters A
digits #