diff --git a/MinGenie/MinGenie/ContentView.swift b/MinGenie/MinGenie/ContentView.swift index 6ab8dbc..fb2bce0 100644 --- a/MinGenie/MinGenie/ContentView.swift +++ b/MinGenie/MinGenie/ContentView.swift @@ -12,10 +12,10 @@ import SwiftUI struct ContentView: View { @Environment(\.scenePhase) var phase - @StateObject private var shakeDetectionModel = ShakeDetectionModel() + @StateObject var shakeDetectionModel = ShakeDetectionModel() @StateObject var musicPlayerModel = MusicPlayerModel.shared - @State private var hasSeenOnboarding: Bool = false + @AppStorage("Onboarding") var hasSeenOnboarding = false var body: some View { if hasSeenOnboarding { diff --git a/MinGenie/MinGenie/OnboardingViews/OnboardingLastPageView.swift b/MinGenie/MinGenie/OnboardingViews/OnboardingLastPageView.swift index 5834877..ea3945d 100644 --- a/MinGenie/MinGenie/OnboardingViews/OnboardingLastPageView.swift +++ b/MinGenie/MinGenie/OnboardingViews/OnboardingLastPageView.swift @@ -8,9 +8,10 @@ import SwiftUI struct OnboardingLastPageView: View { + @Binding var hasSeenOnboarding: Bool + let title: String let imageName: String - @Binding var hasSeenOnboarding: Bool var body: some View { ZStack { diff --git a/MinGenie/MinGenie/OnboardingViews/OnboardingTabView.swift b/MinGenie/MinGenie/OnboardingViews/OnboardingTabView.swift index e6f7746..0be77cf 100644 --- a/MinGenie/MinGenie/OnboardingViews/OnboardingTabView.swift +++ b/MinGenie/MinGenie/OnboardingViews/OnboardingTabView.swift @@ -60,9 +60,9 @@ struct OnboardingTabView: View { ) } else if currentPage == 6 { OnboardingLastPageView( + hasSeenOnboarding: $hasSeenOnboarding, title: "음악과 함께\n일할 준비가 되셨나요?", - imageName: "headphone", - hasSeenOnboarding: $hasSeenOnboarding + imageName: "headphone" ) } }