基本上,UIImageJPEGRepresentation使用的内存似乎不会在函数调用后立即释放,而是会在内存中保留一段时间,如果它在for循环中被多次调用,最终会导致应用程序崩溃。localError { // self.localPath == nil }
if let data = UIImageJPEGRepresentation
如果从error 'jpegData(compressionQuality:)' has been renamed to 'UIImageJPEGRepresentation(_:_:)'执行更正,它抛出了error 'UIImageJPEGRepresentation' has been replaced by instance method 'UIImage.jpegData(compressionQualitylet fileURL = documentsDirectory.appe