Use item provider for sharing images
This commit is contained in:
parent
fa20d7c4f7
commit
142daae015
|
@ -194,7 +194,9 @@ extension ImageViewController {
|
||||||
|
|
||||||
func presentActivityViewController() {
|
func presentActivityViewController() {
|
||||||
if let image = imageView.image {
|
if let image = imageView.image {
|
||||||
let activityViewController = UIActivityViewController(activityItems: [image], applicationActivities: [])
|
let activityViewController = UIActivityViewController(
|
||||||
|
activityItems: [NSItemProvider(object: image)],
|
||||||
|
applicationActivities: [])
|
||||||
|
|
||||||
if UIDevice.current.userInterfaceIdiom == .pad {
|
if UIDevice.current.userInterfaceIdiom == .pad {
|
||||||
activityViewController.popoverPresentationController?
|
activityViewController.popoverPresentationController?
|
||||||
|
|
Loading…
Reference in New Issue