Photos

Save image to photo library
UIImageWriteToSavedPhotosAlbum(<#T##image: UIImage##UIImage#>, 
<#T##completionTarget: Any?##Any?#>, 
<#T##completionSelector: Selector?##Selector?#>, 
<#T##contextInfo: UnsafeMutableRawPointer?##UnsafeMutableRawPointer?#>)
Save video to photo library
PHPhotoLibrary.shared().performChanges({
    PHAssetChangeRequest.creationRequestForAssetFromVideo(atFileURL: self.output)
    }) { saved, error in
        if saved {
            let alertController = UIAlertController(title: "Your video was successfully saved", message: nil, preferredStyle: .alert)
            let defaultAction = UIAlertAction(title: "OK", style: .default, handler: nil)
            alertController.addAction(defaultAction)
            self.present(alertController, animated: true, completion: nil)
        }
}
Copyright © Xianbin Lin 2017 all right reserved,powered by GitbookModified time: 2017-07-23 18:40:08

results matching ""

    No results matching ""