Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import Foundation
- import UIKit
- class ImageSaver: NSObject {
- func writeToPhotoAlbum(image: UIImage) {
- UIImageWriteToSavedPhotosAlbum(image, self, #selector(saveCompleted), nil)
- }
- @objc func saveCompleted(_ image: UIImage, didFinishSavingWithError error: Error?, contextInfo: UnsafeRawPointer) {
- print("Save finished")
- }
- }
Add Comment
Please, Sign In to add comment