I would like to mask an image
with a color and filling both the selection and the rest.
I'm using CGImageCreateWithMaskingColors
, but then I don't know how to fill the image
with another color.
Here is the begining of my code
UIImage *source = [UIImage imageNamed:@"nb.png"];
const CGFloat myMaskingColors[6] = {0,110,0,110,0,110};
CGImageRef imageRef = CGImageCreateWithMaskingColors(source.CGImage, myMaskingColors);
UIImage* imageB = [UIImage imageWithCGImage:imageRef];
UIImageView *imageView = [[UIImageView alloc]initWithImage:imageB];
Thanks for your help EDIT: I think I was not clear, I would like one color for the selection and another color for the rest