A customizable verification code textField. Can be used for phone verification codes, passwords etc.
Настраиваемое текстовое поле для кода верификации. Может быть использованно для подтверждения телефона, email-a, ввода пароля и т.д.
To run the example project, clone the repo, and run pod install
from the Example directory first.
- iOS 8.0+
KKPinCodeTextField is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'KKPinCodeTextField'
- Interface Builder:
Add a UITextField
in your Interface Builder and change the class of a textField from UITextField
to KKPinCodeTextField
. You can set the properties in the Attributes Inspector and see a live preview
- Programmatically:
KKPinCodeTextField *textField = [[KKPinCodeTextField alloc] initWithFrame:frame];
[self.view addSubview:textField];
Verification code length. Default value is 4
Bottom borders height. Default value is 4
Spacing between bottom borders. Default value is 10
Bottom border color when digit is filled. Default value is UIColor.lightGrayColor
Bottom border color when digit is empty. Default value is UIColor.redColor
Amirzhan, [email protected]
Bug reports and pull requests are welcome
KKPinCodeTextField is available under the MIT license. See the LICENSE file for more info.