Skip to content

Commit 93662e4

Browse files
authored
Feat: 온보딩 디자인 및 서버 v2 수정 (#T3-154)
* Refactor: SplashViewController Layout 및 네이밍 수정 * Refactor: LoginViewController 수정된 디자인 반영 * Refactor: PrimaryButton 수정된 디자인 색상 반영 * Refactor: TermsAgreementViewController 수정된 디자인 반영 (#T3-154) - Check Icon 이미지 Asset 교체 - TermsAgreementItemView, TermsAgreementItemView UI 수정 - TermsAgreementViewController 네이밍 및 UI 수정 * Refactor: LoginViewController 크기 대응 (#T3-154) * Chore: 이미지 에셋 추가 및 삭제 * Refactor: IntroViewController 수정된 디자인 반영 (#T3-154) - IntroViewController 네이밍 수정 - IntroViewController 변경된 디자인 반영 - IntroViewController 기기 크기 대៖ * Feat: CustomNavigationBar 구현 - CustomNavigationBar 구현 - 기존 UIViewController에서 구현된 configureNavigationBar 삭제 * Refactor: 온보딩 UI 수정된 디자인 반영 (#T3-154) - OnboardingType 워딩 수정 - OnboardingChoiceButton, OnboardingViewController, 등 수정 * Refactor: 온보딩 UserState 추가 및 화면 분기처리 * Feat: Onboarding 서버 v2 적용 (#T3-154) * Fix: IntroView 배경 색상 변경 * Refactor: 오타 수정 * Fix: offset 수정
1 parent d72a635 commit 93662e4

134 files changed

Lines changed: 1332 additions & 744 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Projects/App/Sources/SceneDelegate.swift

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
2020

2121
DIContainer.shared.dependencyInjection()
2222

23-
let splashView = SplashView()
23+
let splashView = SplashViewController()
2424
splashView.delegate = self
2525

2626
window.rootViewController = splashView
@@ -48,31 +48,31 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
4848
}
4949

5050
extension SceneDelegate: SplashViewDelegate {
51-
func splashView(_ sender: Presentation.SplashView, isCompletedAnimated: Bool) {
51+
func splashView(_ sender: Presentation.SplashViewController, isCompletedAnimated: Bool) {
5252
guard isCompletedAnimated else { return }
5353

5454
guard let userDataRepository = DIContainer.shared.resolve(type: UserDataRepositoryProtocol.self)
5555
else { fatalError("userDataRepository 의존성이 등록되지 않았습니다.") }
5656

57-
guard let onboardingRepository = DIContainer.shared.resolve(type: OnboardingRepositoryProtocol.self)
58-
else { fatalError("onboardingRepository 의존성이 등록되지 않았습니다.") }
59-
6057
Task { @MainActor in
6158
let userState = await userDataRepository.reissueToken()
6259
switch userState {
6360
case .user:
64-
if onboardingRepository.isOnboardingDone() {
65-
window?.rootViewController = TabBarView()
66-
} else {
67-
guard let onboardingViewModel = DIContainer.shared.resolve(type: OnboardingViewModel.self) else {
68-
fatalError("onboardingViewModel 의존성이 등록되지 않았습니다.")
69-
}
70-
let onboardingView = OnboardingView(viewModel: onboardingViewModel, onboarding: .time)
71-
let navigationController = UINavigationController(rootViewController: onboardingView)
72-
window?.rootViewController = navigationController
73-
}
61+
window?.rootViewController = TabBarView()
62+
7463
case .guest, nil:
75-
let introView = IntroView()
64+
guard let loginViewModel = DIContainer.shared.resolve(type: LoginViewModel.self)
65+
else { fatalError("loginViewModel 의존성이 등록되지 않았습니다.") }
66+
67+
let loginView = LoginViewController(viewModel: loginViewModel)
68+
let navigationController = UINavigationController(rootViewController: loginView)
69+
window?.rootViewController = navigationController
70+
71+
case .onboarding:
72+
guard let introViewModel = DIContainer.shared.resolve(type: IntroViewModel.self)
73+
else { fatalError("introViewModel 의존성이 등록되지 않았습니다.") }
74+
75+
let introView = IntroViewController(viewModel: introViewModel)
7676
let navigationController = UINavigationController(rootViewController: introView)
7777
window?.rootViewController = navigationController
7878
}

Projects/DataSource/Sources/Endpoint/OnboardingEndpoint.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,12 @@ enum OnboardingEndpoint {
1212

1313
extension OnboardingEndpoint: Endpoint {
1414
var baseURL: String {
15-
return AppProperties.baseURL + "/api/v1/onboardings"
15+
switch self {
16+
case .registerOnboarding:
17+
return AppProperties.baseURL + "/api/v1/onboardings"
18+
case .registerRecommendedRoutine:
19+
return AppProperties.baseURL + "/api/v2/onboardings"
20+
}
1621
}
1722

1823
var path: String {

Projects/Domain/Sources/Entity/Enum/UserState.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@
88
public enum UserState: String {
99
case guest = "GUEST"
1010
case user = "USER"
11+
case onboarding = "ONBOARDING"
1112
}

Projects/Presentation/Resources/Images.xcassets/Graphic/onboarding_graphic.imageset/Contents.json renamed to Projects/Presentation/Resources/Images.xcassets/Graphic/intro_fomo_graphic.imageset/Contents.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
{
22
"images" : [
33
{
4-
"filename" : "onboarding_graphic.png",
4+
"filename" : "intro_fomo_graphic.png",
55
"idiom" : "universal",
66
"scale" : "1x"
77
},
88
{
9-
"filename" : "onboarding_graphic@2x.png",
9+
"filename" : "intro_fomo_graphic@2x.png",
1010
"idiom" : "universal",
1111
"scale" : "2x"
1212
},
1313
{
14-
"filename" : "onboarding_graphic@3x.png",
14+
"filename" : "intro_fomo_graphic@3x.png",
1515
"idiom" : "universal",
1616
"scale" : "3x"
1717
}
12.7 KB
32.3 KB
60.4 KB
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)