Update README.md
AuthField is customizable pin code field like apple 2-factor authentication
let authField = AuthField(pinCount: 6) view.addSubview(authField)
let authFieldConfiguration = AuthFieldConfiguration( pinCount: 6, font: .boldSystemFont(ofSize: 25), spacing: 12, boxWidth: 42, boxHeight: 52, borderColor: .lightGray, selectedBorderColor: .systemGreen, borderWidth: 1, selectedBorderWidth: 2, boxCornerRadius: 12, boxBackgroundColor: .white ) let authField = AuthField(configuration: authFieldConfiguration) view.addSubview(authField)
authField.pin = 123456 // default pin code authField.isSpaceInTheMiddleEnabled = true // Put a space in the middle of the boxes.
authField.delegate = self
Called when all pin codes have been entered
extension ViewController : AuthFieldDelegate { func endEditing(_ authField: AuthField, pinCode: Int) { print(pinCode) } }
©Copyright 2023 CCF 开源发展委员会 Powered by Trustie& IntelliDE 京ICP备13000930号
AuthField
AuthField is customizable pin code field like apple 2-factor authentication
Usage
Customization
properties
Delegation
Called when all pin codes have been entered