From ec8966a1fbad66bb2d44005757db3dc12b23138b Mon Sep 17 00:00:00 2001 From: Alexey Gerasimov Date: Fri, 30 Mar 2018 14:31:20 +0300 Subject: [PATCH] Pin input throttled --- .../PassCode/View/BasePassCodeViewController.swift | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Sources/Controllers/PassCode/View/BasePassCodeViewController.swift b/Sources/Controllers/PassCode/View/BasePassCodeViewController.swift index 97f7b8f..e422425 100644 --- a/Sources/Controllers/PassCode/View/BasePassCodeViewController.swift +++ b/Sources/Controllers/PassCode/View/BasePassCodeViewController.swift @@ -225,9 +225,12 @@ open class BasePassCodeViewController: UIViewController, ConfigurableController open func bindViews() { fakeTextField.rx.text.asDriver() - .drive(onNext: { [weak self] text in + .do(onNext: { [weak self] text in self?.setStates(for: text ?? "") self?.hideError() + }) + .throttle(0.1) + .drive(onNext: { [weak self] text in self?.viewModel.setPassCodeText(text) }) .disposed(by: disposeBag)