Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix overidded color method #14

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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