CocoaPods trunk is moving to be read-only. Read more on the blog, there are 19 months to go.

GeneralFormatter 2.3.0

GeneralFormatter 2.3.0

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Oct 2019
SPMSupports SPM

Maintained by Uriel, Morbix, Cristian Madrid, Luis Filipe Campani.



  • By
  • Uriel Battanoli

GeneralFormatter

CI Status Version License Platform

Features

You can apply the following masks on your textfields:

  • BOLETO
  • BOLETO & CONVENIOS
  • CEP
  • CONVENIOS
  • CPF
  • CPF & CNPJ
  • CNPJ
  • PHONE

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Installation

GeneralFormatter is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "GeneralFormatter"

Usage

Link it directly on UITextFieldDelegate

import GeneralFormatter

func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool {
    return GeneralFormatter.cpf.formatTextField(_: textField, shouldChangeCharactersIn: range, replacementString: string)
}

Authors

Luis Filipe Campani, luisfilipecampani@gmail.com Uriel Battanoli, urielbattanoli@gmail.com

License

GeneralFormatter is available under the MIT license. See the LICENSE file for more info.