Created
August 21, 2012 10:42
-
-
Save jlcampana/3414420 to your computer and use it in GitHub Desktop.
UIColor+IntegerRGB.m
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// UIColor+IntegerRGB.m | |
// Shell mPayment | |
// | |
// Created by Jose Luis Campaña on 8/21/12. | |
// | |
// | |
#import "UIColor+IntegerRGB.h" | |
@implementation UIColor (IntegerRGB) | |
+(UIColor *)colorIntegerWithRed:(NSInteger)red green:(NSInteger)green blue:(NSInteger)blue alpha:(CGFloat)alpha | |
{ | |
return [UIColor colorWithRed:(CGFloat)red/255.0f green:(CGFloat)green/255.0f blue:(CGFloat)blue/255.0f alpha:alpha]; | |
} | |
@end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// UIColor+IntegerRGB.m | |
// Shell mPayment | |
// | |
// Created by Jose Luis Campaña on 8/21/12. | |
// | |
// | |
#import "UIColor+IntegerRGB.h" | |
@implementation UIColor (IntegerRGB) | |
+(UIColor *)colorIntegerWithRed:(NSInteger)red green:(NSInteger)green blue:(NSInteger)blue alpha:(CGFloat)alpha | |
{ | |
return [UIColor colorWithRed:(CGFloat)red/255.0f green:(CGFloat)green/255.0f blue:(CGFloat)blue/255.0f alpha:alpha]; | |
} | |
+(UIColor *)colorWithImageNamed:(NSString *)image | |
{ | |
return [UIColor colorWithPatternImage:[UIImage imageNamed:image]]; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment