gradient-view 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/gradient-view/gradient_view.rb +4 -4
- data/lib/gradient-view/version.rb +1 -1
- metadata +1 -1
@@ -28,15 +28,15 @@ class GradientView < UIView
|
|
28
28
|
end
|
29
29
|
|
30
30
|
def drawLinearGradient
|
31
|
-
context = UIGraphicsGetCurrentContext()
|
32
|
-
color_space = CGColorSpaceCreateDeviceRGB()
|
33
|
-
|
34
31
|
w = CGRectGetWidth(self.frame)
|
35
|
-
h =
|
32
|
+
h = CGRectGetHeight(self.frame)
|
36
33
|
if w == 0 or h == 0
|
37
34
|
return
|
38
35
|
end
|
39
36
|
|
37
|
+
context = UIGraphicsGetCurrentContext()
|
38
|
+
color_space = CGColorSpaceCreateDeviceRGB()
|
39
|
+
|
40
40
|
the_start_color = self.startColor
|
41
41
|
the_final_color = self.finalColor
|
42
42
|
angle = self.angle
|