88
99import UIKit
1010
11- open class BaseCoordinator : NSObject , Coordinator , UINavigationControllerDelegate {
11+ class BaseCoordinator : NSObject , Coordinator , UINavigationControllerDelegate {
1212
1313 var childCoordinators : [ Coordinator ] = [ ]
1414 var parentCoordinator : Coordinator ?
@@ -26,15 +26,15 @@ open class BaseCoordinator: NSObject, Coordinator, UINavigationControllerDelegat
2626 setupNavigationControllerDelegate ( )
2727 }
2828
29- open func start( ) {
29+ func start( ) {
3030 fatalError ( " Start method should be implemented " )
3131 }
3232
33- open func build( ) -> UIViewController {
33+ func build( ) -> UIViewController {
3434 fatalError ( " Build method should be implemented " )
3535 }
3636
37- open func start( coordinatorMode: CoordinatorMode = . push) {
37+ func start( coordinatorMode: CoordinatorMode = . push) {
3838 let viewController = build ( )
3939
4040 switch coordinatorMode {
@@ -64,11 +64,11 @@ open class BaseCoordinator: NSObject, Coordinator, UINavigationControllerDelegat
6464 self . viewController = viewController
6565 }
6666
67- open func dismiss( ) {
67+ func dismiss( ) {
6868 dismiss ( completion: nil )
6969 }
7070
71- open func dismiss( completion: ( ( ) -> Void ) ? = nil ) {
71+ func dismiss( completion: ( ( ) -> Void ) ? = nil ) {
7272 switch coordinatorMode {
7373 case . push:
7474 navigationController. popViewController ( animated: true )
@@ -86,20 +86,20 @@ open class BaseCoordinator: NSObject, Coordinator, UINavigationControllerDelegat
8686 }
8787 }
8888
89- open var navigationControllerDelegate : UINavigationControllerDelegate ? {
89+ var navigationControllerDelegate : UINavigationControllerDelegate ? {
9090 self
9191 }
9292
93- open var shouldForceDelegateOverride : Bool = false
93+ var shouldForceDelegateOverride : Bool = false
9494
95- open func setupNavigationControllerDelegate( ) {
95+ func setupNavigationControllerDelegate( ) {
9696 guard shouldForceDelegateOverride || navigationController. delegate == nil else {
9797 return
9898 }
9999 navigationController. delegate = navigationControllerDelegate
100100 }
101101
102- public func navigationController( _ navigationController: UINavigationController , didShow viewController: UIViewController , animated: Bool ) {
102+ func navigationController( _ navigationController: UINavigationController , didShow viewController: UIViewController , animated: Bool ) {
103103 // We only intend to cover push/pop scenarios here. Present/dismissal handling should be done manually.
104104 let isBeingPresented = navigationController. isBeingPresented
105105 guard let fromViewController = navigationController. transitionCoordinator? . viewController ( forKey: . from) , !isBeingPresented else {
0 commit comments