Permalink
Browse files

Cleanup CBBezier

  • Loading branch information...
1 parent a1e2654 commit ac076f2ea3c8388cd013f6f576fb424fb2e4ea46 Reda Lemeden committed Oct 8, 2012
Showing with 5 additions and 7 deletions.
  1. +5 −7 Custom UIButtons/CBBezier.m
View
12 Custom UIButtons/CBBezier.m
@@ -61,17 +61,15 @@ - (void)drawRect:(CGRect)rect
(id)topColor.CGColor,
(id)bottomColor.CGColor
]);
+
+ CGGradientRef gradient = CGGradientCreateWithColors(colorSpace, (__bridge CFArrayRef)(gradientColors), NULL);
- CGFloat gradientLocations[] = {0, 1};
- CGGradientRef gradient = CGGradientCreateWithColors(colorSpace, (__bridge CFArrayRef)(gradientColors), gradientLocations);
-
- NSArray* highlightedGradientColors = (@[
+ NSArray *highlightedGradientColors = (@[
(id)bottomColor.CGColor,
(id)topColor.CGColor
]);
- CGFloat highlightedGradientLocations[] = {0, 1};
- CGGradientRef highlightedGradient = CGGradientCreateWithColors(colorSpace, (__bridge CFArrayRef)(highlightedGradientColors), highlightedGradientLocations);
+ CGGradientRef highlightedGradient = CGGradientCreateWithColors(colorSpace, (__bridge CFArrayRef)(highlightedGradientColors), NULL);
// Draw Rounded Rectangle
@@ -87,7 +85,7 @@ - (void)drawRect:(CGRect)rect
CGContextRestoreGState(context);
// Draw Inner Glow
- UIBezierPath* innerGlowRect = [UIBezierPath bezierPathWithRoundedRect: CGRectMake(1.5, 1.5, 277, 34) cornerRadius: 2.5];
+ UIBezierPath *innerGlowRect = [UIBezierPath bezierPathWithRoundedRect: CGRectMake(1.5, 1.5, 277, 34) cornerRadius: 2.5];
[innerGlow setStroke];
innerGlowRect.lineWidth = 1;
[innerGlowRect stroke];

0 comments on commit ac076f2

Please sign in to comment.