'UIImageJPEGRepresentation' has been replaced by instance method 'UIImage.jpegData(compressionQuality:)'


swift4.2?くらいからUIImageJPEGRepresentationメソッドはUIImage.jpegDataに差し替えないといけない。

'UIImageJPEGRepresentation' has been replaced by instance method 'UIImage.jpegData(compressionQuality:)'

差し替え例

//before
UIImageJPEGRepresentation(imageView, 0.75)

//after
imageView.jpegData(compressionQuality:0.75)

こんな感じ。