From 482d0805efeea471cef1eb79214d592c1b8529fb Mon Sep 17 00:00:00 2001 From: Roman Volodko Date: Wed, 31 Jan 2018 22:24:42 +0300 Subject: [PATCH] v 1.4.1 fix ColorPicker bugs --- Example/Resources/Main.storyboard | 18 +++++++++--------- .../Color/ColorPickerViewController.swift | 3 +-- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/Example/Resources/Main.storyboard b/Example/Resources/Main.storyboard index 06da68fb..28efc597 100755 --- a/Example/Resources/Main.storyboard +++ b/Example/Resources/Main.storyboard @@ -32,19 +32,19 @@ - - - - + - + - + + + + @@ -52,7 +52,7 @@ - + @@ -72,7 +72,7 @@ - + @@ -93,7 +93,7 @@ - + diff --git a/Source/Pickers/Color/ColorPickerViewController.swift b/Source/Pickers/Color/ColorPickerViewController.swift index 45dcf0c7..07fb1cc1 100755 --- a/Source/Pickers/Color/ColorPickerViewController.swift +++ b/Source/Pickers/Color/ColorPickerViewController.swift @@ -15,7 +15,7 @@ extension UIAlertController { let buttonSelection = UIAlertAction(title: "Select", style: .default) { action in selection?(color) } - buttonSelection.isEnabled = false + buttonSelection.isEnabled = true let storyboard = UIStoryboard(name: "Main", bundle: nil) guard let vc = storyboard.instantiateViewController(withIdentifier: "ColorPicker") as? ColorPickerViewController else { return } @@ -23,7 +23,6 @@ extension UIAlertController { set(title: color.hexString, font: .systemFont(ofSize: 17), color: color) vc.set(color: color) { new in - buttonSelection.isEnabled = color != new color = new self.set(title: color.hexString, font: .systemFont(ofSize: 17), color: color) }