You can apply the following masks on your textfields:
- BOLETO
- BOLETO & CONVENIOS
- CEP
- CONVENIOS
- CPF
- CPF & CNPJ
- CNPJ
- PHONE
To run the example project, clone the repo, and run pod install
from the Example directory first.
GeneralFormatter is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "GeneralFormatter"
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)
}
Luis Filipe Campani, luisfilipecampani@gmail.com Uriel Battanoli, urielbattanoli@gmail.com
GeneralFormatter is available under the MIT license. See the LICENSE file for more info.