From 42e1a4a8c1ca381f21d435f43dbc304e1cd547a9 Mon Sep 17 00:00:00 2001 From: Grigory Date: Tue, 2 May 2017 17:13:47 +0300 Subject: [PATCH 1/2] digets fixde --- .../PassCode/View/BasePassCodeViewController.swift | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/LeadKitAdditions/LeadKitAdditions/Controllers/PassCode/View/BasePassCodeViewController.swift b/LeadKitAdditions/LeadKitAdditions/Controllers/PassCode/View/BasePassCodeViewController.swift index 7a309f1..d74bedf 100644 --- a/LeadKitAdditions/LeadKitAdditions/Controllers/PassCode/View/BasePassCodeViewController.swift +++ b/LeadKitAdditions/LeadKitAdditions/Controllers/PassCode/View/BasePassCodeViewController.swift @@ -57,6 +57,7 @@ open class BasePassCodeViewController: UIViewController { fakeTextField.isSecureTextEntry = true fakeTextField.keyboardType = .numberPad fakeTextField.isHidden = true + fakeTextField.delegate = self self.view.addSubview(fakeTextField) return fakeTextField }() @@ -237,3 +238,15 @@ extension BasePassCodeViewController: ConfigurableController { open func localize() {} } + +extension BasePassCodeViewController: UITextFieldDelegate { + + func textField(_ textField: UITextField, + shouldChangeCharactersIn range: NSRange, + replacementString string: String) -> Bool { + + let invalid = CharacterSet(charactersIn: "0123456789").inverted + return string.rangeOfCharacter(from: invalid, options: [], range: string.startIndex.. Date: Tue, 2 May 2017 17:25:31 +0300 Subject: [PATCH 2/2] version fixed --- LeadKitAdditions.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LeadKitAdditions.podspec b/LeadKitAdditions.podspec index 5f61d19..3921526 100644 --- a/LeadKitAdditions.podspec +++ b/LeadKitAdditions.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "LeadKitAdditions" - s.version = "0.0.8" + s.version = "0.0.9" s.summary = "iOS framework with a bunch of tools for rapid development" s.homepage = "https://github.com/NikAshanin/LeadKitAdditions" s.license = "Apache License, Version 2.0"