mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-29 11:47:39 +00:00
fix(ios): better "install from file" view hierarchy placement
This commit is contained in:
parent
af06478b73
commit
b205d1efff
2 changed files with 10 additions and 6 deletions
|
|
@ -110,14 +110,14 @@ class MainViewController: UIViewController, TextViewDelegate, UIActionSheetDeleg
|
|||
// We have to gerry-rig this so that the framework-based SettingsViewController
|
||||
// can launch the app-based DocumentViewController.
|
||||
if #available(iOS 11.0, *) {
|
||||
Manager.shared.fileBrowserLauncher = { _ in
|
||||
Manager.shared.fileBrowserLauncher = { navVC in
|
||||
let vc = PackageBrowserViewController(documentTypes: ["com.keyman.kmp"],
|
||||
in: .import,
|
||||
navVC: self.navigationController!)
|
||||
navVC: navVC)
|
||||
|
||||
// Auto-dismiss the settings menu, then present the "install from file" browser.
|
||||
self.navigationController!.topViewController!.dismiss(animated: true, completion: nil)
|
||||
self.present(vc, animated: true)
|
||||
// Present the "install from file" browser within the specified navigation view controller.
|
||||
// (Allows displaying from within the Settings menu)
|
||||
navVC.present(vc, animated: true)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -97,7 +97,11 @@ class PackageBrowserViewController: UIDocumentPickerViewController, UIDocumentPi
|
|||
activitySpinner.stopAnimating()
|
||||
activitySpinner.removeFromSuperview()
|
||||
self.view.isUserInteractionEnabled = true
|
||||
self.dismiss(animated: true, completion: nil)
|
||||
if let navVC = self.navVC {
|
||||
navVC.dismiss(animated: true, completion: nil)
|
||||
} else {
|
||||
self.dismiss(animated: true, completion: nil)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue