IOS - Unint UIImage

I know how to hone UIImage

:

UIImage* originalImage = curiv.image;
UIImage* imageForRendering = [originalImage imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
curiv.image = imageForRendering;
curiv.tintColor = [UIColor RedColor];

      

But how do you undo the original UIImage

?

+3


source to share


1 answer


You can try 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!

+2


source







All Articles