I'm trying to add delay into UITextField but I'm getting the following error:
Property 'text' requires that 'UITextField' inherit from 'UILabel'
Value of type 'Binder<String?>' has no member 'debounce'
Here is my implementation:
func bind() {
(myTextField.rx.text.debounce(0.5, scheduler: MainScheduler.instance) as AnyObject)
.map {
if $0 == ""{
return "Type your name bellow"
}else {
return "Hello, \($0 ?? "")."
}
}
.bind(to: myLbl.rx.text)
.disposed(by: disposeBag)
}
Any of you knows why I'm getting this error?
I'll really appreciate your help.