iPad: Set correct sourceRect for the popover anchored on the central 'Add' button

Signed-off-by: Roopesh Chander <roop@roopc.net>
This commit is contained in:
Roopesh Chander 2018-11-07 18:23:12 +05:30
parent b3515c937e
commit 3269bb476a
1 changed files with 1 additions and 0 deletions

View 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)
}