SyntaxFix
Write A Post
Hire A Developer
Questions
Now in Swift 4.2 you can use pngData() new instance method of UIImage to get the data from the image
pngData()
UIImage
let profileImage = UIImage(named:"profile")! let imageData = profileImage.pngData()