I'm trying to save a UIImage
to NSData
and then read the NSData
back to a new UIImage
in Swift. To convert the UIImage
to NSData
I'm using the following code:
let imageData: NSData = UIImagePNGRepresentation(myImage)
How do I convert imageData
(i.e., NSData
) back to a new UIImage
?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…