开发者

How to archive and unarchive images in iphone

开发者 https://www.devze.com 2022-12-12 05:44 出处:网络
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?Archiv

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

精彩评论

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