Skip to content

quavodanceq/PinCodeTextField

Repository files navigation

PinCodeTextField

A customizable code textField. Can be used for phone verification codes, passwords etc.

example

Installation

Swift Package Manager

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))
]

Usage

  1. 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

usage
  1. Programmatically:
let textField = PinCodeTextField()
textField.emptyDigitBorderColor = .gray
textField.filledDigitBorderColor = .blue
textField.digitsCount = 4
textField.bordersSpacing = 5

Releases

No releases published

Packages

No packages published

Languages