I'm using two UIImageViews overlay image is having some shapes with white surroundings I need to color only the white surrounding but when I'm selecting color it is applying for complete image.
UIButton *selectBtn=(UIButton *)sender;
previousButtonTag=selectBtn.tag;
UIImage *selectImg=[self tintedBackgroundImageWithColor:[self.ColorsArray objectAtIndex:sender.tag]];
OverlayImg.backgroundColor=[ColorsArray objectAtIndex:sender.tag];
CGRect drawRect = CGRectMake(0,0,OverlayImg.image.size.width, OverlayImg.image.size.height);
UIGraphicsBeginImageContextWithOptions(OverlayImg.image.size,0,0);
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSetBlendMode(context, kCGBlendModeSourceAtop);
selectImg=UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
OverlayImg.image=selectImg;