]> git.ipfire.org Git - thirdparty/wireguard-apple.git/commitdiff
iPad: Set correct sourceRect for the popover anchored on the central 'Add' button
authorRoopesh Chander <roop@roopc.net>
Wed, 7 Nov 2018 12:53:12 +0000 (18:23 +0530)
committerRoopesh Chander <roop@roopc.net>
Wed, 7 Nov 2018 12:53:12 +0000 (18:23 +0530)
Signed-off-by: Roopesh Chander <roop@roopc.net>
WireGuard/WireGuard/UI/iOS/TunnelsListTableViewController.swift

index 26924fa545ca487336119e694a7ca8ce989261d3..edecc67a4abbf5e43fe75766806e0368187d65d1 100644 (file)
@@ -113,6 +113,7 @@ class TunnelsListTableViewController: UIViewController {
             alert.popoverPresentationController?.barButtonItem = sender
         } else if let sender = sender as? UIView {
             alert.popoverPresentationController?.sourceView = sender
+            alert.popoverPresentationController?.sourceRect = sender.bounds
         }
         self.present(alert, animated: true, completion: nil)
     }