From ec8966a1fbad66bb2d44005757db3dc12b23138b Mon Sep 17 00:00:00 2001 From: Alexey Gerasimov Date: Fri, 30 Mar 2018 14:31:20 +0300 Subject: [PATCH 1/3] 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) From eeeac049894f41c528b2e88f1458cbb1e0a30137 Mon Sep 17 00:00:00 2001 From: Alexey Gerasimov Date: Fri, 30 Mar 2018 14:39:18 +0300 Subject: [PATCH 2/3] Try delay --- .../Controllers/PassCode/View/BasePassCodeViewController.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Controllers/PassCode/View/BasePassCodeViewController.swift b/Sources/Controllers/PassCode/View/BasePassCodeViewController.swift index e422425..3392350 100644 --- a/Sources/Controllers/PassCode/View/BasePassCodeViewController.swift +++ b/Sources/Controllers/PassCode/View/BasePassCodeViewController.swift @@ -229,7 +229,7 @@ open class BasePassCodeViewController: UIViewController, ConfigurableController self?.setStates(for: text ?? "") self?.hideError() }) - .throttle(0.1) + .delay(0.1) .drive(onNext: { [weak self] text in self?.viewModel.setPassCodeText(text) }) From 63d748a46e9092f8b8d546e357676b83b2f54139 Mon Sep 17 00:00:00 2001 From: Alexey Gerasimov Date: Fri, 30 Mar 2018 14:44:36 +0300 Subject: [PATCH 3/3] Version incremented --- CHANGELOG.md | 4 ++++ LeadKitAdditions.podspec | 2 +- .../PassCode/View/BasePassCodeViewController.swift | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 37edc1c..482049f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 0.2.1 + +- **Fixed**: BasePassCodeViewController doesn't draw last dot filled + ## 0.2.0 - **Updated**: LeadKit to `0.7.x` version - **Removed**: `CellField*` and `FormField*` protocols and classes. diff --git a/LeadKitAdditions.podspec b/LeadKitAdditions.podspec index 95654d1..34a1cbc 100644 --- a/LeadKitAdditions.podspec +++ b/LeadKitAdditions.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "LeadKitAdditions" - s.version = "0.2.0" + s.version = "0.2.1" s.summary = "iOS framework with a bunch of tools for rapid development" s.homepage = "https://github.com/TouchInstinct/LeadKitAdditions" s.license = "Apache License, Version 2.0" diff --git a/Sources/Controllers/PassCode/View/BasePassCodeViewController.swift b/Sources/Controllers/PassCode/View/BasePassCodeViewController.swift index 3392350..26f8ba0 100644 --- a/Sources/Controllers/PassCode/View/BasePassCodeViewController.swift +++ b/Sources/Controllers/PassCode/View/BasePassCodeViewController.swift @@ -229,7 +229,7 @@ open class BasePassCodeViewController: UIViewController, ConfigurableController self?.setStates(for: text ?? "") self?.hideError() }) - .delay(0.1) + .delay(0.1) // time to draw dots .drive(onNext: { [weak self] text in self?.viewModel.setPassCodeText(text) })