A simple StackView to be used for Passcode or OTP fields. Completely customisable with separate classes and very easy to use. Just Drag and drop with 2 lines of code.
A simple StackView to be used for Passcode or OTP fields. Completely customisable with separate classes and very easy to use. Just Drag and drop with 2 lines of code.
@IBOutlet weak var viewOTP: PinView!
viewOTP.setUpView()
viewOTP.textFields[0].becomeFirstResponder()
var config:PinConfig! = PinConfig()
config.otpLength = .four
config.dotColor = .black
config.lineColor = #colorLiteral(red: 0.8265652657, green: 0.8502194881, blue: 0.9000532627, alpha: 1)
config.spacing = 20
config.isSecureTextEntry = false
config.showPlaceHolder = false
viewOTP.config = config
viewOTP.setUpView()
viewOTP.textFields[0].becomeFirstResponder()