Last active
March 15, 2019 12:59
-
-
Save fieldAbyss/58d8089d0a9a0f807603183790293aff to your computer and use it in GitHub Desktop.
'UIImageJPEGRepresentation' has been replaced by instance method 'UIImage.jpegData(compressionQuality:)'
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Old Swift ~4.0 | |
let imageData = UIImageJPEGRepresentation(image, 0.8) | |
// New Swift 4.2~ | |
let imageData = image.jpegData(compressionQuality: 0.8) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment