UIImageWriteToSavedPhotosAlbum(img, self, #selector(image(_:didFinishSavingWithError:contextInfo:)), nil)
 
func image(_ image: UIImage, didFinishSavingWithError error: NSError?, contextInfo: UnsafeRawPointer) { 
       if let error = error {
           // we got back an error!
           print(error.localizedDescription)  
       } else {
            // save    
       }
}

 

+ Recent posts