diff --git a/LionHeart-iOS/LionHeart-iOS/Scenes/Adaptor/AuthAdaptor.swift b/LionHeart-iOS/LionHeart-iOS/Scenes/Adaptor/AuthAdaptor.swift index 73422c1f..3183ee28 100644 --- a/LionHeart-iOS/LionHeart-iOS/Scenes/Adaptor/AuthAdaptor.swift +++ b/LionHeart-iOS/LionHeart-iOS/Scenes/Adaptor/AuthAdaptor.swift @@ -7,9 +7,9 @@ import Foundation -typealias AuthNaviation = LoginNavigation & OnboardingNavigation & CompleteOnbardingNavigation +typealias EntireAuthNaviation = LoginNavigation & OnboardingNavigation & CompleteOnbardingNavigation -final class AuthAdaptor: AuthNaviation { +final class AuthAdaptor: EntireAuthNaviation { let coordinator: AuthCoordinator init(coordinator: AuthCoordinator) { diff --git a/LionHeart-iOS/LionHeart-iOS/Scenes/Coordinator/CoordinatorImpl/AuthCoordinatorImpl.swift b/LionHeart-iOS/LionHeart-iOS/Scenes/Coordinator/CoordinatorImpl/AuthCoordinatorImpl.swift index 6f5bcb85..bfada5d7 100644 --- a/LionHeart-iOS/LionHeart-iOS/Scenes/Coordinator/CoordinatorImpl/AuthCoordinatorImpl.swift +++ b/LionHeart-iOS/LionHeart-iOS/Scenes/Coordinator/CoordinatorImpl/AuthCoordinatorImpl.swift @@ -25,8 +25,7 @@ final class AuthCoordinatorImpl: AuthCoordinator { } func showLoginViewController() { - let authAdaptor = AuthAdaptor(coordinator: self) - let loginViewController = factory.makeLoginViewController(navigator: authAdaptor) + let loginViewController = factory.makeLoginViewController(coordinator: self) self.navigationController.pushViewController(loginViewController, animated: true) } @@ -36,8 +35,7 @@ final class AuthCoordinatorImpl: AuthCoordinator { } func showOnboardingCompleteViewController(data: UserOnboardingModel) { - let completeAdaptor = AuthAdaptor(coordinator: self) - let completeViewController = factory.makeCompleteOnbardingViewController(navigator: completeAdaptor) + let completeViewController = factory.makeCompleteOnbardingViewController(coordinator: self) completeViewController.userData = data self.navigationController.pushViewController(completeViewController, animated: true) } @@ -48,8 +46,7 @@ final class AuthCoordinatorImpl: AuthCoordinator { case .verified: splashCoorinator?.showTabbarViewContoller() case .nonVerified: - let onboardingAdaptor = AuthAdaptor(coordinator: self) - let onboardingViewController = factory.makeOnboardingViewController(navigator: onboardingAdaptor) + let onboardingViewController = factory.makeOnboardingViewController(coordinator: self) onboardingViewController.setKakaoAccessToken(kakaoToken) self.navigationController.pushViewController(onboardingViewController, animated: true) } diff --git a/LionHeart-iOS/LionHeart-iOS/Scenes/Coordinator/CoordinatorInterface/MypageCoordinator.swift b/LionHeart-iOS/LionHeart-iOS/Scenes/Coordinator/CoordinatorInterface/MypageCoordinator.swift index 74a2398f..185b5fd9 100644 --- a/LionHeart-iOS/LionHeart-iOS/Scenes/Coordinator/CoordinatorInterface/MypageCoordinator.swift +++ b/LionHeart-iOS/LionHeart-iOS/Scenes/Coordinator/CoordinatorInterface/MypageCoordinator.swift @@ -30,6 +30,13 @@ final class MypageCoordinator: Coordinator { myPageViewController.coordinator = self self.navigationController.pushViewController(myPageViewController, animated: true) } + func dismiss() { + + } + + func pop() { + + } } extension MypageCoordinator: MyPageNavigation { diff --git a/LionHeart-iOS/LionHeart-iOS/Scenes/Factory/FactoryImpl/AuthFactoryImpl.swift b/LionHeart-iOS/LionHeart-iOS/Scenes/Factory/FactoryImpl/AuthFactoryImpl.swift index b14e8f1c..82e2eac3 100644 --- a/LionHeart-iOS/LionHeart-iOS/Scenes/Factory/FactoryImpl/AuthFactoryImpl.swift +++ b/LionHeart-iOS/LionHeart-iOS/Scenes/Factory/FactoryImpl/AuthFactoryImpl.swift @@ -8,19 +8,22 @@ import UIKit struct AuthFactoryImpl: AuthFactory { + func makeAuthAdaptor(coordinator: AuthCoordinator) -> EntireAuthNaviation { + return AuthAdaptor(coordinator: coordinator) + } - func makeLoginViewController(navigator: LoginNavigation) -> LoginViewControllerable { - let loginViewController = LoginViewController(manager: LoginMangerImpl(authService: AuthServiceImpl(apiService: APIService())), navigator: navigator) + func makeLoginViewController(coordinator: AuthCoordinator) -> LoginViewControllerable { + let loginViewController = LoginViewController(manager: LoginMangerImpl(authService: AuthServiceImpl(apiService: APIService())), navigator: self.makeAuthAdaptor(coordinator: coordinator)) return loginViewController } - func makeCompleteOnbardingViewController(navigator: CompleteOnbardingNavigation) -> CompleteOnbardingViewControllerable { - let completeViewController = CompleteOnbardingViewController(navigator: navigator) + func makeCompleteOnbardingViewController(coordinator: AuthCoordinator) -> CompleteOnbardingViewControllerable { + let completeViewController = CompleteOnbardingViewController(navigator: self.makeAuthAdaptor(coordinator: coordinator)) return completeViewController } - func makeOnboardingViewController(navigator: OnboardingNavigation) -> OnboardingViewControllerable { - let onboardingViewController = OnboardingViewController(manager: OnboardingManagerImpl(authService: AuthServiceImpl(apiService: APIService())), navigator: navigator) + func makeOnboardingViewController(coordinator: AuthCoordinator) -> OnboardingViewControllerable { + let onboardingViewController = OnboardingViewController(manager: OnboardingManagerImpl(authService: AuthServiceImpl(apiService: APIService())), navigator: self.makeAuthAdaptor(coordinator: coordinator)) return onboardingViewController } diff --git a/LionHeart-iOS/LionHeart-iOS/Scenes/Factory/FactoryInterface/AuthFactory.swift b/LionHeart-iOS/LionHeart-iOS/Scenes/Factory/FactoryInterface/AuthFactory.swift index 41ef656e..a60a8072 100644 --- a/LionHeart-iOS/LionHeart-iOS/Scenes/Factory/FactoryInterface/AuthFactory.swift +++ b/LionHeart-iOS/LionHeart-iOS/Scenes/Factory/FactoryInterface/AuthFactory.swift @@ -8,9 +8,10 @@ import Foundation protocol AuthFactory { - func makeLoginViewController(navigator: LoginNavigation) -> LoginViewControllerable - func makeCompleteOnbardingViewController(navigator: CompleteOnbardingNavigation) -> CompleteOnbardingViewControllerable - func makeOnboardingViewController(navigator: OnboardingNavigation) -> OnboardingViewControllerable + func makeAuthAdaptor(coordinator: AuthCoordinator) -> EntireAuthNaviation + func makeLoginViewController(coordinator: AuthCoordinator) -> LoginViewControllerable + func makeCompleteOnbardingViewController(coordinator: AuthCoordinator) -> CompleteOnbardingViewControllerable + func makeOnboardingViewController(coordinator: AuthCoordinator) -> OnboardingViewControllerable }