-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
391 additions
and
238 deletions.
There are no files selected for viewing
This file contains 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 characters
38 changes: 38 additions & 0 deletions
38
iOS-NOTTODO/iOS-NOTTODO/Coordinator/Factory/AchieveViewControllerFactory.swift
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// | ||
// AchieveViewControllerFactory.swift | ||
// iOS-NOTTODO | ||
// | ||
// Created by JEONGEUN KIM on 3/23/24. | ||
// | ||
|
||
import Foundation | ||
|
||
extension ViewControllerFactoryImpl { | ||
|
||
func makeAchieveViewModel(coordinator: AchieveCoordinator) -> any AchievementViewModel { | ||
let missionAPI = DefaultMissionService() | ||
let manager = AchieveManagerImpl(missionAPI: missionAPI) | ||
let viewModel = AchievementViewModelImpl(coordinator: coordinator, manager: manager) | ||
return viewModel | ||
} | ||
|
||
func makeAchieveViewController(coordinator: AchieveCoordinator) -> AchievementViewController { | ||
let viewModel = self.makeAchieveViewModel(coordinator: coordinator) | ||
let viewController = AchievementViewController(viewModel: viewModel) | ||
return viewController | ||
} | ||
|
||
func makeAchieveDetailViewModel(coordinator: AchieveCoordinator) -> any DetailAchievementViewModel & DetailAchievementViewModelPresentable { | ||
let missionAPI = DefaultMissionService() | ||
let manager = AchieveManagerImpl(missionAPI: missionAPI) | ||
let viewModel = DetailAchievementViewModelImpl(coordinator: coordinator, manager: manager) | ||
return viewModel | ||
} | ||
|
||
func makeAchieveDetailViewController(coordinator: AchieveCoordinator, date: String) -> DetailAchievementViewController { | ||
let viewModel = self.makeAchieveDetailViewModel(coordinator: coordinator) | ||
viewModel.selectedDate(date) | ||
let viewController = DetailAchievementViewController(viewModel: viewModel) | ||
return viewController | ||
} | ||
} |
51 changes: 51 additions & 0 deletions
51
iOS-NOTTODO/iOS-NOTTODO/Coordinator/Factory/AuthViewControllerFactory.swift
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
// | ||
// AuthViewControllerFactory.swift | ||
// iOS-NOTTODO | ||
// | ||
// Created by JEONGEUN KIM on 3/23/24. | ||
// | ||
|
||
import Foundation | ||
|
||
extension ViewControllerFactoryImpl { | ||
func makeAuthViewController(coordinator: AuthCoordinator) -> AuthViewController { | ||
let viewController = AuthViewController(coordinator: coordinator) | ||
return viewController | ||
} | ||
|
||
func makeNotificationDialogViewController(coordinator: AuthCoordinator, completion: @escaping () -> Void) -> NotificationDialogViewController { | ||
let viewController = NotificationDialogViewController() | ||
viewController.buttonHandler = { | ||
completion() | ||
} | ||
return viewController | ||
} | ||
} | ||
|
||
// Onboarding | ||
extension ViewControllerFactoryImpl { | ||
func makeValueOnboardingViewController(coordinator: AuthCoordinator) -> ValueOnboardingViewController { | ||
let viewController = ValueOnboardingViewController(coordinator: coordinator) | ||
return viewController | ||
} | ||
func makeLogoOnboardingViewController(coordinator: AuthCoordinator) -> LogoOnboardingViewController { | ||
let viewController = LogoOnboardingViewController(coordinator: coordinator) | ||
return viewController | ||
} | ||
func makeSecondOnboardingViewController(coordinator: AuthCoordinator) -> SecondOnboardingViewController { | ||
let viewController = SecondOnboardingViewController(coordinator: coordinator) | ||
return viewController | ||
} | ||
func makeThirdOnboardingViewController(coordinator: AuthCoordinator) -> ThirdOnboardingViewController { | ||
let viewController = ThirdOnboardingViewController(coordinator: coordinator) | ||
return viewController | ||
} | ||
func makeFourthOnboardingViewController(coordinator: AuthCoordinator) -> FourthOnboardingViewController { | ||
let viewController = FourthOnboardingViewController(coordinator: coordinator) | ||
return viewController | ||
} | ||
func makeFifthOnboardingViewController(coordinator: AuthCoordinator) -> FifthOnboardingViewController { | ||
let viewController = FifthOnboardingViewController(coordinator: coordinator) | ||
return viewController | ||
} | ||
} |
Oops, something went wrong.