Add missing shim controller
This commit is contained in:
parent
7acf77f572
commit
e52b3531d9
|
@ -621,10 +621,9 @@ extension AppCoordinator: UISplitViewControllerDelegate {
|
|||
|
||||
func splitViewController(_ splitViewController: UISplitViewController, collapseSecondary secondaryViewController:UIViewController, onto primaryViewController:UIViewController) -> Bool {
|
||||
|
||||
if let shimController = rootSplitViewController.viewControllers.last,
|
||||
let detailNav = shimController.children.first as? UINavigationController,
|
||||
let detail = detailNav.topViewController as? DetailViewController {
|
||||
if let detailNav = secondaryViewController.children.first as? UINavigationController, let detail = detailNav.topViewController {
|
||||
masterNavigationController.pushViewController(detail, animated: false)
|
||||
detail.navigationItem.leftBarButtonItem = rootSplitViewController.displayModeButtonItem
|
||||
return true
|
||||
}
|
||||
|
||||
|
@ -967,7 +966,9 @@ private extension AppCoordinator {
|
|||
|
||||
let systemMessageViewController = UIStoryboard.main.instantiateController(ofType: SystemMessageViewController.self)
|
||||
let navController = addNavControllerIfNecessary(systemMessageViewController, showButton: false)
|
||||
rootSplitViewController.showDetailViewController(navController, sender: self)
|
||||
let shimController = UIViewController()
|
||||
shimController.addChildAndPinView(navController)
|
||||
rootSplitViewController.showDetailViewController(shimController, sender: self)
|
||||
return navController
|
||||
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue