iPhone How to get image back from NSData
12,759
Solution 1
have you tried +[UIImage imageWithData:]
?
Solution 2
UIImage *img=[UIImage imageWithData:data];
[yourImageView setImage:img];
Author by
ios
Updated on July 05, 2022Comments
-
ios almost 2 years
In my iPhone App I am storing image into
NSData
byUIImage *image =imageView.image; NSData *myData = UIImagePNGRepresentation(image);
But How to get back "image" from "
NSData
" and I can display it again into in toUIImageView
.Please Help and Suggest, Thanks.