Implement detail next and prev article buttons.

This commit is contained in:
Maurice Parker
2019-04-21 17:42:26 -05:00
parent 73500e0244
commit e81defb934
8 changed files with 216 additions and 110 deletions

View File

@@ -128,7 +128,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UISplitViewControllerDele
func splitViewController(_ splitViewController: UISplitViewController, collapseSecondary secondaryViewController:UIViewController, onto primaryViewController:UIViewController) -> Bool {
guard let secondaryAsNavController = secondaryViewController as? UINavigationController else { return false }
guard let topAsDetailController = secondaryAsNavController.topViewController as? DetailViewController else { return false }
if topAsDetailController.article == nil {
if topAsDetailController.navState?.currentArticle == nil {
// Return true to indicate that we have handled the collapse by doing nothing; the secondary controller will be discarded.
return true
}