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