From 6d5a587655d6496b3bf26c04474c052a1d9641c7 Mon Sep 17 00:00:00 2001 From: Jon Maddox Date: Tue, 11 Sep 2012 21:18:21 -0400 Subject: [PATCH 1/2] change method signature to not conflict with the already existing method --- MAConfirmButton/UIColor-Expanded.h | 2 +- MAConfirmButton/UIColor-Expanded.m | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/MAConfirmButton/UIColor-Expanded.h b/MAConfirmButton/UIColor-Expanded.h index da06bfe..40d6da1 100755 --- a/MAConfirmButton/UIColor-Expanded.h +++ b/MAConfirmButton/UIColor-Expanded.h @@ -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; diff --git a/MAConfirmButton/UIColor-Expanded.m b/MAConfirmButton/UIColor-Expanded.m index d117618..5badb95 100755 --- a/MAConfirmButton/UIColor-Expanded.m +++ b/MAConfirmButton/UIColor-Expanded.m @@ -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 @@ -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]; From 1f3b397709811b43abd0b39118e4f10af4484bd7 Mon Sep 17 00:00:00 2001 From: Jon Maddox Date: Tue, 11 Sep 2012 21:18:26 -0400 Subject: [PATCH 2/2] use new method --- MAConfirmButton/MAConfirmButton.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAConfirmButton/MAConfirmButton.m b/MAConfirmButton/MAConfirmButton.m index b0cfd7e..982573e 100644 --- a/MAConfirmButton/MAConfirmButton.m +++ b/MAConfirmButton/MAConfirmButton.m @@ -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]; }