CGImageRef rawImageRef = image.CGImage; const double colorMasking[6] = { 0, 0, 0, 0, 0, 0 }; UIGraphicsBeginImageContext(image.size); CGImageRef maskedImageRef = CGImageCreateWithMaskingColors(rawImageRef, colorMasking); { CGContextTranslateCTM(UIGraphicsGetCurrentContext(), 0.0, image.size.height); CGContextScaleCTM(UIGraphicsGetCurrentContext(), 1.0, -1.0); } ...
Change color of image to transparent
C