Skip to content

Instantly share code, notes, and snippets.

View dcinzona's full-sized avatar
๐Ÿ†”
๐Ÿง‘โ€๐Ÿ’ป๐ŸŒŽ๐ŸŒŽ๐ŸŒŽโ˜๏ธ

Gustavo Tandeciarz dcinzona

๐Ÿ†”
๐Ÿง‘โ€๐Ÿ’ป๐ŸŒŽ๐ŸŒŽ๐ŸŒŽโ˜๏ธ
  • Salesforce
  • Washington, DC
View GitHub Profile
@dcinzona
dcinzona / gist:1628893
Created January 17, 2012 21:11
Creating arbitrarily-colored icons from a black-with-alpha master image (iOS)
// Usage example:
// input image: http://f.cl.ly/items/3v0S3w2B3N0p3e0I082d/Image%202011.07.22%2011:29:25%20PM.png
//
// UIImage *buttonImage = [UIImage ipMaskedImageNamed:@"UIButtonBarAction.png" color:[UIColor redColor]];
// .h
@interface UIImage (IPImageUtils)
+ (UIImage *)ipMaskedImageNamed:(NSString *)name color:(UIColor *)color;
@end