? UIImage*image = [UIImageimageNamed:@"test"];
? ? imageView.image = [image imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
? ? CGRectrect =CGRectMake(0,0, image.size.width, image.size.height);
? ? UIGraphicsBeginImageContext(rect.size);
? ? CGContextRef context = UIGraphicsGetCurrentContext();
? ? CGContextClipToMask(context, rect, image.CGImage);
? ? CGContextSetFillColorWithColor(context, [[UIColor redColor] CGColor]);
? ? CGContextFillRect(context, rect);
? ? UIImage *img = UIGraphicsGetImageFromCurrentImageContext();
? ? UIGraphicsEndImageContext();
? ? UIImage *flippedImage = [UIImage imageWithCGImage:img.CGImage scale:1.0 orientation: UIImageOrientationDownMirrored];
? ? imageView.image = flippedImage;