UIImage没有实现copy的方法,要想copy有几种方法可以实现
1.
UIImage *smallImage = [UIImage imageWithCGImage:[originalImage CGImage]];
2.
CGImageRef newCgIm = CGImageCreateCopy(picImage.CGImage);
UIImage *newImage = [UIImage imageWithCGImage:newCgIm scale:self.picImage.scale orientation:picImage.imageOrientation];
CGImageRelease(newCgIm);
3.
UIImage *newImage = [UIImage imageWithData:UIImagePNGRepresentation(oldImage)];
4.
UIImage *imageToCopy = (your image here);
UIGraphicsBeginImageContext(imageToCopy.size);
[imageToCopy drawInRect:CGRectMake(0, 0, imageToCopy.size.width, imageToCopy.size.height)];
UIImage *copiedImage = [UIGraphicsGetImageFromCurrentImageContext() retain];
UIGraphicsEndImageContext();