iPad: Ensure we set sourceRect for all cases where we use sourceView
This commit is contained in:
parent
2fd8792fa5
commit
cc52c88321
|
@ -99,8 +99,8 @@ class SettingsTableViewController: UITableViewController {
|
|||
let activityVC = UIActivityViewController(activityItems: [destinationURL], applicationActivities: nil)
|
||||
// popoverPresentationController shall be non-nil on the iPad
|
||||
activityVC.popoverPresentationController?.sourceView = sourceView
|
||||
activityVC.popoverPresentationController?.sourceRect = sourceView.bounds
|
||||
present(activityVC, animated: true)
|
||||
|
||||
} catch (let error) {
|
||||
showErrorAlert(title: "Unable to export", message: "There was an error exporting the tunnel configuration archive: \(String(describing: error))")
|
||||
}
|
||||
|
|
|
@ -72,6 +72,7 @@ class TunnelDetailTableViewController: UITableViewController {
|
|||
|
||||
// popoverPresentationController will be nil on iPhone and non-nil on iPad
|
||||
alert.popoverPresentationController?.sourceView = sourceView
|
||||
alert.popoverPresentationController?.sourceRect = sourceView.bounds
|
||||
|
||||
self.present(alert, animated: true, completion: nil)
|
||||
}
|
||||
|
|
|
@ -400,6 +400,7 @@ extension TunnelEditTableViewController {
|
|||
|
||||
// popoverPresentationController will be nil on iPhone and non-nil on iPad
|
||||
alert.popoverPresentationController?.sourceView = sourceView
|
||||
alert.popoverPresentationController?.sourceRect = sourceView.bounds
|
||||
|
||||
self.present(alert, animated: true, completion: nil)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue