Reputation: 4878
I know how to tint an UIImage
:
UIImage* originalImage = curiv.image;
UIImage* imageForRendering = [originalImage imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
curiv.image = imageForRendering;
curiv.tintColor = [UIColor RedColor];
But how to untint to original UIImage
?
Upvotes: 3
Views: 97
Reputation: 3389
You can try like this way
UIImage* originalImage = curiv.image;
UIImage* imageForRendering = [originalImage imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
curiv.image = imageForRendering;
UIColor *prevTintColor = curiv.tintColor;
//set new Tint color as Red
curiv.tintColor = [UIColor redColor];
//Now if you want to set back previous color
curiv.tintColor=prevTintColor;
Enjoy Coding !!
Upvotes: 2