Assuming I want to change only a specific color (per pixel) in a given UIImageView. How to use the following code to change all white pixels in darkGray?
- (UIImage *) changeColorForImage:(UIImage *)image toColor:(UIColor*)color { UIGraphicsBeginImageContext(image.size); CGRect contextRect; contextRect.origin.x = 0.0f; contextRect.origin.y = 0.0f; contextRect.size = [image size];
chewy source share