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
1 changed files with 3 additions and 1 deletions

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?