How to save aUIImage using NSUserDefaults
How 开发者_如何学JAVAdo I save an Image to User Defaults
You can save it as NSData. To get a NSData object from a UIImage, you can use one of the following functions:
NSData * UIImagePNGRepresentation (UIImage *image);
NSData * UIImageJPEGRepresentation (UIImage *image);
And to turn the NSData back into an image, you can use imageWithData or initWithData
UIImage * a = [[UIImage alloc] initWithData:data];
UIImage * b = [UIImage imageWithData:data];
But maybe it's a better idea to write it to a different file.
精彩评论