Latest 1.1.0
Homepage https://github.com/gabriel-kozma/swift-mask-textfield
License MIT
Platforms ios 9.0
Authors

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 #

(1.1.0)

  • Added support for adding a prefix on the resulting string, works the same as before, just set the prefix on the storyboard or through code and the lib will take care of the rest

Latest podspec

{
    "name": "SwiftMaskTextfield",
    "version": "1.1.0",
    "summary": "An TextField with masking capabilities",
    "description": "# SwiftMaskTextfieldnnSwiftMaskTextfield inherits from UITextField for supporting masks into textfields that can be defined into the storyboardnn* Lightweight implementationn* Can be used with or without masksn* Ability to override de formatting function to create custom implemantion of the classn* The replaceable characters from the mask format can be changed by overriding themn* Supports spaces, dots and any special chars on the format, for instance: "####.### ###"nn### How to usen* Install with cocoapods or copy the class SwiftMaskTextfield into your projectn* Add a UITextfield component into your storyboard or xibn* Set it's custom class to SwiftMaskTextfieldn* Set the formatting mask into the property formatPattern in Interface Builder or programatticallynn| Characters | Format replacement |n|:------------:|:------------------------------:|n| letters and digits | __*__ |n| any letter | [email protected]__ |n| lowercase letters | __a__ |n| uppercase letters | __A__ |n| digits | __#__ |",
    "homepage": "https://github.com/gabriel-kozma/swift-mask-textfield",
    "license": {
        "type": "MIT",
        "file": "LICENSE.md"
    },
    "authors": {
        "Gabriel Kozma": "[email protected]"
    },
    "social_media_url": "https://www.linkedin.com/in/gabriel-maccori-kozma-4b3b1032",
    "platforms": {
        "ios": "9.0"
    },
    "swift_version": "4.2",
    "source": {
        "git": "https://github.com/gabriel-kozma/swift-mask-textfield.git",
        "tag": "1.1.0"
    },
    "source_files": "swift-mask-textfield/**/*.{swift}"
}

Pin It on Pinterest

Share This