问题
In my iPhone App I am storing image into NSData
by
UIImage *image =imageView.image;
NSData *myData = UIImagePNGRepresentation(image);
But How to get back "image" from "NSData
" and I can display it again into in to UIImageView
.
Please Help and Suggest, Thanks.
回答1:
have you tried +[UIImage imageWithData:]
?
回答2:
UIImage *img=[UIImage imageWithData:data];
[yourImageView setImage:img];
来源:https://stackoverflow.com/questions/4655174/iphone-how-to-get-image-back-from-nsdata