Skip to content

Commit

Permalink
Merge pull request #2 from maddox/fix-overidded-color-method
Browse files Browse the repository at this point in the history
Fix overidded color method
  • Loading branch information
maddox committed Sep 20, 2012
2 parents 3bed90a + 1f3b397 commit 220906d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion MAConfirmButton/MAConfirmButton.m
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ - (void)setAnchor:(CGPoint)anchor{
}

- (void)setTintColor:(UIColor *)color{
self.tint = [UIColor colorWithHue:color.hue saturation:color.saturation+0.15 brightness:color.brightness alpha:1];
self.tint = [UIColor newColorWithHue:color.hue saturation:color.saturation+0.15 brightness:color.brightness alpha:1];
colorLayer.backgroundColor = tint.CGColor;
[self setNeedsDisplay];
}
Expand Down
2 changes: 1 addition & 1 deletion MAConfirmButton/UIColor-Expanded.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
+ (NSDictionary *)namedCrayons;

// Build a color with the given HSB values
+ (UIColor *)colorWithHue:(CGFloat)hue saturation:(CGFloat)saturation brightness:(CGFloat)brightness alpha:(CGFloat)alpha;
+ (UIColor *)newColorWithHue:(CGFloat)hue saturation:(CGFloat)saturation brightness:(CGFloat)brightness alpha:(CGFloat)alpha;

// Low level conversions between RGB and HSL spaces
+ (void)hue:(CGFloat)h saturation:(CGFloat)s brightness:(CGFloat)v toRed:(CGFloat *)r green:(CGFloat *)g blue:(CGFloat *)b;
Expand Down
4 changes: 2 additions & 2 deletions MAConfirmButton/UIColor-Expanded.m
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ - (UIColor *)complementaryColor {
if (h > 360.f) h -= 360.0f;

// Create a color in RGB
return [UIColor colorWithHue:h saturation:s brightness:v alpha:a];
return [UIColor newColorWithHue:h saturation:s brightness:v alpha:a];
}

// Pick two colors more colors such that all three are equidistant on the color wheel
Expand Down Expand Up @@ -540,7 +540,7 @@ + (NSDictionary *)namedCrayons {
return crayolaNameCache;
}

+ (UIColor *)colorWithHue:(CGFloat)hue saturation:(CGFloat)saturation brightness:(CGFloat)brightness alpha:(CGFloat)alpha {
+ (UIColor *)newColorWithHue:(CGFloat)hue saturation:(CGFloat)saturation brightness:(CGFloat)brightness alpha:(CGFloat)alpha {
// Convert hsb to rgb
CGFloat r,g,b;
[self hue:hue saturation:saturation brightness:brightness toRed:&r green:&g blue:&b];
Expand Down

0 comments on commit 220906d

Please sign in to comment.