diff --git a/Cherrish-iOS/Cherrish-iOS/Assets.xcassets/ChallengeImage/Contents.json b/Cherrish-iOS/Cherrish-iOS/Assets.xcassets/ChallengeImage/Contents.json new file mode 100644 index 00000000..73c00596 --- /dev/null +++ b/Cherrish-iOS/Cherrish-iOS/Assets.xcassets/ChallengeImage/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Cherrish-iOS/Cherrish-iOS/Assets.xcassets/ChallengeImage/challengeStartCherry.imageset/Contents.json b/Cherrish-iOS/Cherrish-iOS/Assets.xcassets/ChallengeImage/challengeStartCherry.imageset/Contents.json new file mode 100644 index 00000000..6fbadaa6 --- /dev/null +++ b/Cherrish-iOS/Cherrish-iOS/Assets.xcassets/ChallengeImage/challengeStartCherry.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "challengeStartCherry.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Cherrish-iOS/Cherrish-iOS/Assets.xcassets/ChallengeImage/challengeStartCherry.imageset/challengeStartCherry.svg b/Cherrish-iOS/Cherrish-iOS/Assets.xcassets/ChallengeImage/challengeStartCherry.imageset/challengeStartCherry.svg new file mode 100644 index 00000000..b704c42d --- /dev/null +++ b/Cherrish-iOS/Cherrish-iOS/Assets.xcassets/ChallengeImage/challengeStartCherry.imageset/challengeStartCherry.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/Cherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/Coordinator/ChallengeCoordinator.swift b/Cherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/Coordinator/ChallengeCoordinator.swift index 2322853f..46b0bdf3 100644 --- a/Cherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/Coordinator/ChallengeCoordinator.swift +++ b/Cherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/Coordinator/ChallengeCoordinator.swift @@ -10,8 +10,9 @@ import SwiftUI enum ChallengeRoute: PresentationTypeProtocol { case root case startChallenge - case selectMission + case selectRoutine case loading + case selectMission } final class ChallengeCoordinator: CoordinatorProtocol { diff --git a/Cherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/Coordinator/ChallengeCoordinatorView.swift b/Cherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/Coordinator/ChallengeCoordinatorView.swift index b4437650..94e4cd7b 100644 --- a/Cherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/Coordinator/ChallengeCoordinatorView.swift +++ b/Cherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/Coordinator/ChallengeCoordinatorView.swift @@ -19,10 +19,12 @@ struct ChallengeCoordinatorView: View { ViewFactory.shared.makeChallengeView() case .startChallenge: ViewFactory.shared.makeStartChallengeView() - case .selectMission: - ViewFactory.shared.makeSelectMissionView() + case .selectRoutine: + ViewFactory.shared.makeSelectRoutineView() case .loading: ViewFactory.shared.makeLoadingView() + case .selectMission: + ViewFactory.shared.makeSelectMissionView() } } } diff --git a/Cherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/SelectRoutineView.swift b/Cherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/SelectRoutineView.swift new file mode 100644 index 00000000..e6586a8a --- /dev/null +++ b/Cherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/SelectRoutineView.swift @@ -0,0 +1,26 @@ +// +// SelectRoutineView.swift +// Cherrish-iOS +// +// Created by sumin Kong on 1/13/26. +// + +import SwiftUI + +struct SelectRoutineView: View { + @EnvironmentObject private var challengeCoordinator: ChallengeCoordinator + + var body: some View { + ZStack { + Color.red600 + + VStack { + Text("SelectRoutine") + + Button("next") { + challengeCoordinator.push(.loading) + } + } + } + } +} diff --git a/Cherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/StartChallengeView.swift b/Cherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/StartChallengeView.swift index 05b9fd5c..58b137dc 100644 --- a/Cherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/StartChallengeView.swift +++ b/Cherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/StartChallengeView.swift @@ -10,15 +10,37 @@ import SwiftUI struct StartChallengeView: View { @EnvironmentObject private var challengeCoordinator: ChallengeCoordinator + @State private var startButtonState: ButtonState = .active + var body: some View { - ZStack { - Color.red600 - VStack { - Text("StartChallenge") - Button("next") { - challengeCoordinator.push(.selectMission) + VStack { + HStack { + VStack(alignment: .leading, spacing: 4) { + TypographyText("이번엔 어떤 루틴으로 관리할까요?", style: .headline_sb_20, color: .gray1000) + TypographyText("루틴을 지킬수록 체리가 성장해요.", style: .title2_m_16, color: .gray800) } + Spacer() + } + .padding(.top, 84.adjustedH) + .padding(.leading, 24.adjustedW) + + Spacer() + + Image(.challengeStartCherry) + + Spacer() + + HStack(spacing: 12) { + Image("info") + TypographyText("이 챌린지는 설정 시점부터 7일간 진행됩니다.", style: .body3_m_12, color: .gray600) + } + .padding(.bottom, 12.adjustedH) + + CherrishButton(title: "챌린지 시작하기", type: .next, state: $startButtonState) { + challengeCoordinator.push(.selectRoutine) } + .padding(.horizontal, 24.adjustedW) + .padding(.bottom, 36.adjustedH) } } } diff --git a/Cherrish-iOS/Cherrish-iOS/Presentation/ViewFactory.swift b/Cherrish-iOS/Cherrish-iOS/Presentation/ViewFactory.swift index b5a3241f..59f722e4 100644 --- a/Cherrish-iOS/Cherrish-iOS/Presentation/ViewFactory.swift +++ b/Cherrish-iOS/Cherrish-iOS/Presentation/ViewFactory.swift @@ -16,6 +16,7 @@ protocol ViewFactoryProtocol { func makeMyPageView() -> MyPageView func makeSelectTreatmentView() -> SelectTreatmentView func makeStartChallengeView() -> StartChallengeView + func makeSelectRoutineView() -> SelectRoutineView func makeSelectMissionView() -> SelectMissionView func makeLoadingView() -> LoadingView } @@ -61,6 +62,10 @@ final class ViewFactory: ViewFactoryProtocol { return StartChallengeView() } + func makeSelectRoutineView() -> SelectRoutineView { + return SelectRoutineView() + } + func makeSelectMissionView() -> SelectMissionView { return SelectMissionView() }