From c0316f55efd41e509b359fd3e9766ec760268163 Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Mon, 15 Jun 2020 18:29:04 -0400 Subject: [PATCH] Fix crash when sharing large image on iPad --- Tusker/Screens/Large Image/LargeImageViewController.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Tusker/Screens/Large Image/LargeImageViewController.swift b/Tusker/Screens/Large Image/LargeImageViewController.swift index d16567e5..cf0f28be 100644 --- a/Tusker/Screens/Large Image/LargeImageViewController.swift +++ b/Tusker/Screens/Large Image/LargeImageViewController.swift @@ -227,6 +227,9 @@ class LargeImageViewController: UIViewController, UIScrollViewDelegate, LargeIma @IBAction func sharePressed(_ sender: Any) { guard let image = image else { return } let activityVC = UIActivityViewController(activityItems: [image], applicationActivities: nil) + if let presentationController = activityVC.presentationController as? UIPopoverPresentationController { + presentationController.sourceView = shareButton + } present(activityVC, animated: true) }