Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CGSize imageSize = [imageView.image size];
- CGRect imageExtent = CGRectMake(0,0,imageSize.width,imageSize.height);
- // Create a context containing the image.
- UIGraphicsBeginImageContext(imageSize);
- CGContextRef context = UIGraphicsGetCurrentContext();
- [imageView.image drawAtPoint:CGPointMake(0, 0)];
- // Draw the hue on top of the image.
- CGContextSetBlendMode(context, kCGBlendModeHue);
- [color set];
- UIBezierPath *imagePath = [UIBezierPath bezierPathWithRect:imageExtent];
- [imagePath fill];
- // Retrieve the new image.
- UIImage *result = UIGraphicsGetImageFromCurrentImageContext();
- imageView.image= result;
- UIGraphicsEndImageContext();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement