Hi all ,
To convert UIImage to NSData
Objective C
NSData *data = UIImagePNGRepresentation(self.MyImageView.image);
Swift
let imageData: NSData = UIImagePNGRepresentation(self.MyImageView.image)
To convert NSData to UIImage
Objective C
UIImage *image = [UIImage imageWithData:data];
Swift
let image: UIImage = UIImage(data:imageData,scale:1.0)
0 Comment(s)