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.
@@ -124,7 +124,7 @@ class ISDColorPaletteViewController < UIViewController
124
124
 
125
125
  color ||= :clear.uicolor
126
126
 
127
- self.color_layer.backgroundColor = color.uicolor.cgcolor
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
- end
130
+ end
116
131
 
117
132
 
118
133
  end
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.3
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-01-29 00:00:00.000000000 Z
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: 3447295052054517356
74
+ hash: 4394609946671966429
75
75
  required_rubygems_version: !ruby/object:Gem::Requirement
76
76
  none: false
77
77
  requirements: