Guest User

Untitled

a guest
Jan 10th, 2023
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Swift 0.36 KB | None | 0 0
  1. import Foundation
  2. import UIKit
  3.  
  4. class ImageSaver: NSObject {
  5.     func writeToPhotoAlbum(image: UIImage) {
  6.         UIImageWriteToSavedPhotosAlbum(image, self, #selector(saveCompleted), nil)
  7.     }
  8.     @objc func saveCompleted(_ image: UIImage, didFinishSavingWithError error: Error?, contextInfo: UnsafeRawPointer) {
  9.         print("Save finished")
  10.     }
  11. }
  12.  
Add Comment
Please, Sign In to add comment