@implementation UIImageView (Utils)
- (void)setImageRenderingMode:(UIImageRenderingMode)mode
{
if (self.image)
{
UIImage* newImage = [self.image imageWithRenderingMode:mode];
[self setImage:newImage];
}
}
- (void)fillWithColor:(UIColor*)color
{
[self setImageRenderingMode:UIImageRenderingModeAlwaysTemplate];
self.tintColor = color;
}
@end
Showing posts with label iOS objective-c. Show all posts
Showing posts with label iOS objective-c. Show all posts
Thursday, February 25, 2016
To fill any image with color
Subscribe to:
Posts (Atom)