-
Notifications
You must be signed in to change notification settings - Fork 1
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
3 changed files
with
93 additions
and
0 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
HMH_Tuist_iOS/Projects/App/Sources/Coordinator/AuthCoordinator.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,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())) | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
HMH_Tuist_iOS/Projects/App/Sources/Coordinator/OnboardingCoordinator.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,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()) | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
HMH_Tuist_iOS/Projects/App/Sources/Coordinator/TabBarCoordinator.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,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 | ||
} | ||
} |