diff --git a/Cherrish-iOS/Cherrish-iOS/Assets.xcassets/Color/splash_gradient_1.colorset/Contents.json b/Cherrish-iOS/Cherrish-iOS/Assets.xcassets/Color/splash_gradient_1.colorset/Contents.json new file mode 100644 index 00000000..5fd02262 --- /dev/null +++ b/Cherrish-iOS/Cherrish-iOS/Assets.xcassets/Color/splash_gradient_1.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xFD", + "green" : "0xFD", + "red" : "0xFF" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xFD", + "green" : "0xFD", + "red" : "0xFF" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Cherrish-iOS/Cherrish-iOS/Assets.xcassets/Color/splash_gradient_2.colorset/Contents.json b/Cherrish-iOS/Cherrish-iOS/Assets.xcassets/Color/splash_gradient_2.colorset/Contents.json new file mode 100644 index 00000000..655618f1 --- /dev/null +++ b/Cherrish-iOS/Cherrish-iOS/Assets.xcassets/Color/splash_gradient_2.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xE6", + "green" : "0xE0", + "red" : "0xFA" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xE6", + "green" : "0xE0", + "red" : "0xFA" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Cherrish-iOS/Cherrish-iOS/Assets.xcassets/splash/Contents.json b/Cherrish-iOS/Cherrish-iOS/Assets.xcassets/splash/Contents.json new file mode 100644 index 00000000..73c00596 --- /dev/null +++ b/Cherrish-iOS/Cherrish-iOS/Assets.xcassets/splash/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Cherrish-iOS/Cherrish-iOS/Assets.xcassets/splash/appicon.imageset/Contents.json b/Cherrish-iOS/Cherrish-iOS/Assets.xcassets/splash/appicon.imageset/Contents.json new file mode 100644 index 00000000..19b8540b --- /dev/null +++ b/Cherrish-iOS/Cherrish-iOS/Assets.xcassets/splash/appicon.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "splash_logo.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "splash_logo@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "splash_logo@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Cherrish-iOS/Cherrish-iOS/Assets.xcassets/splash/appicon.imageset/splash_logo.png b/Cherrish-iOS/Cherrish-iOS/Assets.xcassets/splash/appicon.imageset/splash_logo.png new file mode 100644 index 00000000..d6bf292e Binary files /dev/null and b/Cherrish-iOS/Cherrish-iOS/Assets.xcassets/splash/appicon.imageset/splash_logo.png differ diff --git a/Cherrish-iOS/Cherrish-iOS/Assets.xcassets/splash/appicon.imageset/splash_logo@2x.png b/Cherrish-iOS/Cherrish-iOS/Assets.xcassets/splash/appicon.imageset/splash_logo@2x.png new file mode 100644 index 00000000..8b1ac74a Binary files /dev/null and b/Cherrish-iOS/Cherrish-iOS/Assets.xcassets/splash/appicon.imageset/splash_logo@2x.png differ diff --git a/Cherrish-iOS/Cherrish-iOS/Assets.xcassets/splash/appicon.imageset/splash_logo@3x.png b/Cherrish-iOS/Cherrish-iOS/Assets.xcassets/splash/appicon.imageset/splash_logo@3x.png new file mode 100644 index 00000000..27116b76 Binary files /dev/null and b/Cherrish-iOS/Cherrish-iOS/Assets.xcassets/splash/appicon.imageset/splash_logo@3x.png differ diff --git a/Cherrish-iOS/Cherrish-iOS/Presentation/Coordinator/AppCoordinator.swift b/Cherrish-iOS/Cherrish-iOS/Presentation/Coordinator/AppCoordinator.swift index eb24eaab..a5c1e932 100644 --- a/Cherrish-iOS/Cherrish-iOS/Presentation/Coordinator/AppCoordinator.swift +++ b/Cherrish-iOS/Cherrish-iOS/Presentation/Coordinator/AppCoordinator.swift @@ -9,13 +9,14 @@ import Foundation import SwiftUI enum AppState { + case splash case onboarding case home } final class AppCoordinator: ObservableObject { @Published var path: NavigationPath = NavigationPath() - @Published var appState: AppState = .onboarding + @Published var appState: AppState = .splash func navigationToTabbar() { path.removeLast(path.count) diff --git a/Cherrish-iOS/Cherrish-iOS/Presentation/Coordinator/AppCoordinatorView.swift b/Cherrish-iOS/Cherrish-iOS/Presentation/Coordinator/AppCoordinatorView.swift index da4e62f4..51b177f8 100644 --- a/Cherrish-iOS/Cherrish-iOS/Presentation/Coordinator/AppCoordinatorView.swift +++ b/Cherrish-iOS/Cherrish-iOS/Presentation/Coordinator/AppCoordinatorView.swift @@ -13,6 +13,8 @@ struct AppCoordinatorView: View { var body: some View { Group { switch appCoordinator.appState { + case .splash: + SplashView() case .onboarding: OnboardingCoordinatorView() case .home: diff --git a/Cherrish-iOS/Cherrish-iOS/Presentation/Feature/Onboarding/SplashView.swift b/Cherrish-iOS/Cherrish-iOS/Presentation/Feature/Onboarding/SplashView.swift new file mode 100644 index 00000000..ab45447a --- /dev/null +++ b/Cherrish-iOS/Cherrish-iOS/Presentation/Feature/Onboarding/SplashView.swift @@ -0,0 +1,33 @@ +// +// SplashView.swift +// Cherrish-iOS +// +// Created by 이나연 on 1/17/26. +// + +import SwiftUI + +struct SplashView: View { + @EnvironmentObject private var appCoordinator: AppCoordinator + + var body: some View { + ZStack(alignment: .center) { + LinearGradient( + gradient: Gradient(stops: [ + .init(color: .splashGradient1, location: 0.6), + .init(color: .splashGradient2, location: 1.0) + ]), + startPoint: .topLeading, + endPoint: .bottomTrailing + ) + + Image(.appicon) + } + .onAppear { + DispatchQueue.main.asyncAfter(deadline: .now() + 3) { + appCoordinator.navigationToOnboarding() + } + } + .ignoresSafeArea() + } +} diff --git a/Cherrish-iOS/Cherrish-iOS/Presentation/Global/Components/Treatment/TreatmentRowView.swift b/Cherrish-iOS/Cherrish-iOS/Presentation/Global/Components/Treatment/TreatmentRowView.swift index b0e66ace..3bd3582f 100644 --- a/Cherrish-iOS/Cherrish-iOS/Presentation/Global/Components/Treatment/TreatmentRowView.swift +++ b/Cherrish-iOS/Cherrish-iOS/Presentation/Global/Components/Treatment/TreatmentRowView.swift @@ -105,7 +105,7 @@ private struct TreatmentCheckBoxView: View { isSelected: Binding, isCompleted: Binding, isCompletedView: Bool = false, - action: @escaping () -> Void, + action: @escaping () -> Void ) { self.treatmentEntity = treatmentEntity self._isSelected = isSelected