isd-color-palette 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/isd-color-palette/controller/isd_color_palette_view_controller.rb +1 -1
- data/lib/isd-color-palette/controller/isd_rgba_color_view_controller.rb +16 -1
- data/lib/resources/ISDColorPalette.storyboardc/DDB-9Z-aLd-view-cjl-ZX-JRH.nib +0 -0
- data/lib/resources/ISDColorPalette.storyboardc/ISDColorPaletteViewController.nib +0 -0
- data/lib/resources/ISDColorPalette.storyboardc/Info.plist +0 -0
- data/lib/resources/ISDColorPalette.storyboardc/Ojg-L0-U3y-view-RZ8-kV-96R.nib +0 -0
- data/lib/resources/ISDColorPalette.storyboardc/UIViewController-DDB-9Z-aLd.nib +0 -0
- data/lib/resources/ISDColorPalette.storyboardc/UIViewController-Ojg-L0-U3y.nib +0 -0
- data/lib/resources/ISDColorPalette.storyboardc/UIViewController-Yhi-Ks-PNF.nib +0 -0
- data/lib/resources/ISDColorPalette.storyboardc/UIViewController-lfU-qe-W46.nib +0 -0
- data/lib/resources/ISDColorPalette.storyboardc/Yhi-Ks-PNF-view-DbN-fh-FRU.nib +0 -0
- data/lib/resources/ISDColorPalette.storyboardc/ccp-rq-upX-view-Gjb-sR-XRJ.nib +0 -0
- metadata +3 -3
@@ -124,7 +124,7 @@ class ISDColorPaletteViewController < UIViewController
|
|
124
124
|
|
125
125
|
color ||= :clear.uicolor
|
126
126
|
|
127
|
-
self.color_layer.backgroundColor = color.
|
127
|
+
self.color_layer.backgroundColor = color.cgcolor
|
128
128
|
self.color_layer.removeAllAnimations
|
129
129
|
self.solid_layer.backgroundColor = color.uicolor(1).cgcolor
|
130
130
|
self.solid_layer.removeAllAnimations
|
@@ -106,13 +106,28 @@ class ISDRgbaColorViewController < UIViewController
|
|
106
106
|
end
|
107
107
|
|
108
108
|
def didChangeColor sender
|
109
|
+
cancel_did_change_color
|
110
|
+
schedule_did_change_color sender
|
111
|
+
end
|
112
|
+
|
113
|
+
private
|
114
|
+
|
115
|
+
def schedule_did_change_color sender
|
116
|
+
self.performSelector "force_did_change_color:", withObject:sender, afterDelay:0.2
|
117
|
+
end
|
118
|
+
|
119
|
+
def cancel_did_change_color
|
120
|
+
self.class.cancelPreviousPerformRequestsWithTarget self
|
121
|
+
end
|
122
|
+
|
123
|
+
def force_did_change_color sender
|
109
124
|
c = self.parentViewController.parentViewController
|
110
125
|
color = UIColor.colorWithRed self.views[0].color_value,
|
111
126
|
green:self.views[1].color_value,
|
112
127
|
blue:self.views[2].color_value,
|
113
128
|
alpha:self.views[3].color_value
|
114
129
|
parentViewController.parentViewController.didChangeColor color
|
115
|
-
|
130
|
+
end
|
116
131
|
|
117
132
|
|
118
133
|
end
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: isd-color-palette
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-02-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -71,7 +71,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
71
71
|
version: '0'
|
72
72
|
segments:
|
73
73
|
- 0
|
74
|
-
hash:
|
74
|
+
hash: 4394609946671966429
|
75
75
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
76
76
|
none: false
|
77
77
|
requirements:
|