TVMaskfield
allows you to mask your textfield by simply setting a string mask to it.
There are three existing types for mask characters. Combine one or more of them to create the mask. The mask characters are the following:
0
for numbersA
for letters*
for alphanumeric
Define your textfield class to TVMaskTextField
in the identity inspector and set your mask in attributes inspector.
Define the mask by setting up the textMask property of the TVMaskTextField
.
maskTextField.textMask = "0000 0000 0000 0000"
TVMaskField is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'TVMaskField'
Thalys Viana
TVMaskField is available under the MIT license. See the LICENSE file for more info.