Get current text !
wonder2011 opened this issue · 2 comments
wonder2011 commented
I can't get the current text, and I can't set the current text.
For example
let otpTextField.otpCurrentText // return the current text, example 777777 or 77
and
otpTextField.otpCurrentText = "9988"
oscarito9410 commented
Here's a workaround for this adding a selector
otpTextField.addTarget(self, action: #selector(textDidChange), for: .editingChanged)
then
@objc
func textDidChange() {
print(otpTextField.text)
}
AbdelrhmanKamalEliwa commented
@wonder2011 Next release, will make another delegate for the current text. For now, you can try the @oscarito9410 solution.