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

This commit is contained in:
Roopesh Chander 2018-11-07 18:23:12 +05:30
parent d477b132e4
commit 6e142cd924
1 changed files with 1 additions and 0 deletions

View File

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