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
|
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
|
// MARK: UINavigationControllerDelegate
|
||||||
|
Loading…
x
Reference in New Issue
Block a user