Add Keyboard Type
Closed this issue · 4 comments
Really great repo. I appreciate your work. Can you please keyboard type as well? (Numeric, Email etc)
Hello, thanks for your interest in this repo!
Please look at this property, in PinCodeTextField class, it should suite your needs well.
public var keyboardType: UIKeyboardType = UIKeyboardType.alphabet
Unfortunately UIKeyboardType is not available in IB for custom views (I can't mark it as IBInspectable), so please set it in your code to your preferred keyboard type.
P.s. You can see example of keyboardType setting here
https://github.com/tkach/PinCodeTextField/blob/master/PinCodeTextFieldExample/ViewController.swift
at line 22.
Thank you. Yes, I noticed that link. Please close this issue.
in viewDidLoad, You can set it like this,
txtPinCode.keyboardType = .numberPad // for numeric Pin entry