diff --git a/HMH_Tuist_iOS/Projects/App/Sources/Coordinator/AuthCoordinator.swift b/HMH_Tuist_iOS/Projects/App/Sources/Coordinator/AuthCoordinator.swift new file mode 100644 index 00000000..4bff3112 --- /dev/null +++ b/HMH_Tuist_iOS/Projects/App/Sources/Coordinator/AuthCoordinator.swift @@ -0,0 +1,29 @@ +// +// LoginCoordinator.swift +// Coordinator +// +// Created by 이지희 on 11/15/24. +// Copyright © 2024 HMH-iOS. All rights reserved. +// + +import SwiftUI + +import LoginFeature + +final class AuthCoordinator: ObservableObject, CoordinatorType { + var parentCoordinator: (any CoordinatorType)? + + var navigationPath: NavigationPath + + init( + parentCoordinator: any CoordinatorType, + navigationPath: NavigationPath + ) { + self.parentCoordinator = parentCoordinator + self.navigationPath = navigationPath + } + + func start() -> AnyView { + return AnyView(LoginView(viewModel: LoginViewModel())) + } +} diff --git a/HMH_Tuist_iOS/Projects/App/Sources/Coordinator/OnboardingCoordinator.swift b/HMH_Tuist_iOS/Projects/App/Sources/Coordinator/OnboardingCoordinator.swift new file mode 100644 index 00000000..9270f8c3 --- /dev/null +++ b/HMH_Tuist_iOS/Projects/App/Sources/Coordinator/OnboardingCoordinator.swift @@ -0,0 +1,29 @@ +// +// OnboardingCoordinator.swift +// Coordinator +// +// Created by 이지희 on 11/15/24. +// Copyright © 2024 HMH-iOS. All rights reserved. +// + +import SwiftUI + +import OnboardingFeature + +final class OnboardingCoordinator: ObservableObject, CoordinatorType { + var parentCoordinator: (any CoordinatorType)? + + var navigationPath: NavigationPath + + init( + parentCoordinator: (any CoordinatorType)? = nil, + navigationPath: NavigationPath + ) { + self.parentCoordinator = parentCoordinator + self.navigationPath = navigationPath + } + + func start() -> AnyView { + return AnyView(OnboardingContentView()) + } +} diff --git a/HMH_Tuist_iOS/Projects/App/Sources/Coordinator/TabBarCoordinator.swift b/HMH_Tuist_iOS/Projects/App/Sources/Coordinator/TabBarCoordinator.swift new file mode 100644 index 00000000..bb88f97f --- /dev/null +++ b/HMH_Tuist_iOS/Projects/App/Sources/Coordinator/TabBarCoordinator.swift @@ -0,0 +1,35 @@ +// +// TabBarCoordinator.swift +// Coordinator +// +// Created by 이지희 on 11/15/24. +// Copyright © 2024 HMH-iOS. All rights reserved. +// + +import SwiftUI + +class TabBarCoordinator: ObservableObject, CoordinatorType { + var navigationPath: NavigationPath + + var parentCoordinator: (any CoordinatorType)? + + @Published var selectedTab: Tab = .home + + init( + parentCoordinator: CoordinatorType, + navigationPath: NavigationPath + ) { + self.parentCoordinator = parentCoordinator + self.navigationPath = navigationPath + } + + func start() -> AnyView { + AnyView(TabBarView()) + } + + enum Tab { + case home + case challenge + case myPage + } +}