Use item provider for sharing images

This commit is contained in:
Justin Mazzocchi 2021-05-09 22:49:47 -07:00
parent fa20d7c4f7
commit 142daae015
No known key found for this signature in database
GPG key ID: E223E6937AAFB01C

View file

@ -194,7 +194,9 @@ extension ImageViewController {
func presentActivityViewController() {
if let image = imageView.image {
let activityViewController = UIActivityViewController(activityItems: [image], applicationActivities: [])
let activityViewController = UIActivityViewController(
activityItems: [NSItemProvider(object: image)],
applicationActivities: [])
if UIDevice.current.userInterfaceIdiom == .pad {
activityViewController.popoverPresentationController?