原:
- var image = info[UIImagePickerController.InfoKey.init(string: UIImagePickerControllerEditedImage) as String] as? UIImage;
纠正:
- var image = info[UIImagePickerControllerEditedImage] as! UIImage;
原:
guard let imageData = image!.jpegData(compressionQuality: 0.8) else {
return
}
纠正:
guard let imageData = UIImageJPEGRepresentation(image, 0.8) else{
return
};
原:
case .large: return rect.inset(by: UIEdgeInsets.init(top: 8, left: 8, bottom: 8 + 12, right: 8))
纠正:
case .large: return UIEdgeInsetsInsetRect(rect, UIEdgeInsets.init(top: 8, left: 8, bottom: 8 + 12, right: 8))
原:
NotificationCenter.default.addObserver(
self, selector: #selector(clearMemoryCache), name: UIApplication.didReceiveMemoryWarningNotification, object: nil)
纠正:
NotificationCenter.default.addObserver(
self, selector: #selector(clearMemoryCache), name: NSNotification.Name.UIApplicationDidReceiveMemoryWarning, object: nil)