Last active
March 6, 2020 15:14
-
-
Save caldofran/f8b346eb9146efcfd4839eab66fc56c1 to your computer and use it in GitHub Desktop.
Revisions
-
caldofran revised this gist
Mar 6, 2020 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,11 +3,13 @@ class Navigator { switch navigation { case .section(let section): tabBarController().selectedIndex = section.rawValue case .modal(let screen): topMostViewController().present( screen.viewController(), animated: animated ) case .push(let screen): currentNavigationController().pushViewController( screen.viewController(), -
caldofran revised this gist
Mar 3, 2020 . 1 changed file with 8 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,9 +4,15 @@ class Navigator { case .section(let section): tabBarController().selectedIndex = section.rawValue case .modal(let screen): topMostViewController().present( screen.viewController(), animated: animated ) case .push(let screen): currentNavigationController().pushViewController( screen.viewController(), animated: animated ) } } } -
caldofran revised this gist
Mar 3, 2020 . 1 changed file with 3 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,15 +1,12 @@ class Navigator { func handle(navigation: Navigation, animated: Bool = true) { switch navigation { case .section(let section): tabBarController().selectedIndex = section.rawValue case .modal(let screen): topMostViewController().present(screen.viewController(), animated: animated) case .push(let screen): currentNavigationController().pushViewController(screen.viewController(), animated: animated) } } } -
caldofran revised this gist
Nov 20, 2019 . No changes.There are no files selected for viewing
-
caldofran created this gist
Nov 20, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ class Navigator { var tabBarController: UITabBarController! var navigationController: UINavigationController! func handle(navigation: Navigation, animated: Bool = true) { switch navigation { case .section(let section): tabBarController.selectedIndex = section.rawValue case .modal(let screen): tabBarController.present(screen.viewController(), animated: animated) case .push(let screen): navigationController.pushViewController(screen.viewController(), animated: animated) } } }