-
-
Save iosdevie/81f5cb09a925a59929d3ad36e0395755 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func showPreviewImage(image: UIImage) | |
{ | |
let alert = UIAlertController(title: "Preview", message: "", preferredStyle: .actionSheet) | |
alert.addPreviewImage(image: image) | |
alert.addAction(UIAlertAction(title: "Add To Photos", style: .default){ | |
action in | |
UIImageWriteToSavedPhotosAlbum(image, self, nil, nil) | |
}) | |
alert.addAction(UIAlertAction(title: "Cancel", style: .destructive, handler: nil)) | |
present(alert, | |
animated: true, | |
completion: nil) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment