开发者

How to archive and unarchive images in iphone

I am coding an iPhone application where images are transferred from one iPhone to another using Bluetooth. How do I archive an image and send it to another iPhone, then un-archive the image back? Archiving the image directly using NSKeyedarchiver开发者_StackOverflow中文版 doesn't work.


You can turn UIImage objects into NSData representations using the Image Manipulation function UIImageJPEGRepresentation or UIImagePNGRepresentation.

You can turn the NSData representation into a UIImage using the UIImage convenience method imageWithData: or initializer initWithData:.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜