A customizable code textField. Can be used for phone verification codes, passwords etc.
The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the swift compiler.
dependencies: [ .package(url: "github.com/quavodanceq/PinCodeTextField.git", .branch(main)) ]- Interface Builder:
Add a UITextField in your Interface Builder and change the class of a textField from UITextField to PinCodeTextField. You can set the properties in the Attributes Inspector and see a live preview
- Programmatically:
let textField = PinCodeTextField() textField.emptyDigitBorderColor = .gray textField.filledDigitBorderColor = .blue textField.digitsCount = 4 textField.bordersSpacing = 5