开发者

iPhone How to get image back from NSData

开发者 https://www.devze.com 2023-02-03 08:49 出处:网络
In my iPhone App I am storing image into NSDat开发者_如何学Ca by UIImage *image =imageView.image;

In my iPhone App I am storing image into NSDat开发者_如何学Ca 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.


have you tried +[UIImage imageWithData:]?


UIImage *img=[UIImage imageWithData:data];
[yourImageView setImage:img];
0

精彩评论

暂无评论...
验证码 换一张
取 消