mirror of
https://github.com/metabolist/metatext.git
synced 2024-12-23 22:10:29 +00:00
Use item provider for sharing images
This commit is contained in:
parent
fa20d7c4f7
commit
142daae015
1 changed files with 3 additions and 1 deletions
|
@ -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 a new issue