IPhone How to get image from NSData

In my iPhone application, I save the image in NSData on

 UIImage *image =imageView.image; NSData *myData = UIImagePNGRepresentation(image); 

But how to return the "image" with " NSData ", and I can display it again an inch before the UIImageView .

Please help and suggest, Thank you.

+4
source share
2 answers

Have you tried +[UIImage imageWithData:] ?

+15
source
 UIImage *img=[UIImage imageWithData:data]; [yourImageView setImage:img]; 
+7
source

Source: https://habr.com/ru/post/1335038/


All Articles