Create an empty article controller if we are separating controllers and one doesn't exist. Issue #1172 & Issue #1177
This commit is contained in:
parent
0fa8ddd384
commit
48b475a33c
|
@ -939,6 +939,16 @@ extension SceneCoordinator: UISplitViewControllerDelegate {
|
|||
return currentArticle == nil
|
||||
}
|
||||
|
||||
func splitViewController(_ splitViewController: UISplitViewController, separateSecondaryFrom primaryViewController: UIViewController) -> UIViewController? {
|
||||
if masterNavigationController.viewControllers.count == 3 {
|
||||
return nil
|
||||
} else {
|
||||
let articleViewController = UIStoryboard.main.instantiateController(ofType: ArticleViewController.self)
|
||||
articleViewController.coordinator = self
|
||||
return articleViewController
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// MARK: UINavigationControllerDelegate
|
||||
|
|
Loading…
Reference in New Issue