From 43fa5f97a0e80858be93aa6aae0f0e9211df40ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BA=83=E4=B8=AD=E4=BE=9D=E7=B7=92=E7=92=83?= Date: Thu, 16 Apr 2026 12:14:04 +0800 Subject: [PATCH 1/2] Add SplashView for app launch screen --- Outspire/SplashView.swift | 45 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 Outspire/SplashView.swift diff --git a/Outspire/SplashView.swift b/Outspire/SplashView.swift new file mode 100644 index 0000000..1384d87 --- /dev/null +++ b/Outspire/SplashView.swift @@ -0,0 +1,45 @@ +import SwiftUI + +struct SplashView: View { + @State private var isActive = false + @State private var size = 0.8 + @State private var opacity = 0.5 + + var body: some View { + if isActive { + // Replace with your actual Main ContentView + ContentView() + } else { + VStack { + VStack(spacing: 20) { + // Replace "sparkles" with your Outspire logo asset + Image(systemName: "sparkles") + .font(.system(size: 80)) + .foregroundColor(.blue) // Use your primary brand color + + Text("Outspire") + .font(.largeTitle) + .fontWeight(.bold) + } + .scaleEffect(size) + .opacity(opacity) + .onAppear { + withAnimation(.easeIn(duration: 1.0)) { + self.size = 1.0 + self.opacity = 1.0 + } + } + } + .frame(maxWidth: .infinity, maxHeight: .infinity) + .background(Color(UIColor.systemBackground)) + .onAppear { + // Simulates loading time before transitioning to the main app + DispatchQueue.main.asyncAfter(deadline: .now() + 2.0) { + withAnimation { + self.isActive = true + } + } + } + } + } +} From c1ee3f77085db97eaff1ed90a207189032d8dfc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BA=83=E4=B8=AD=E4=BE=9D=E7=B7=92=E7=92=83?= Date: Thu, 16 Apr 2026 12:16:52 +0800 Subject: [PATCH 2/2] Set SplashView as the initial entry point Updated the initial entry point of the app to use SplashView instead of RootTabView. --- Outspire/OutspireApp.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Outspire/OutspireApp.swift b/Outspire/OutspireApp.swift index 71e4a94..ca6ef84 100644 --- a/Outspire/OutspireApp.swift +++ b/Outspire/OutspireApp.swift @@ -42,7 +42,7 @@ struct OutspireApp: App { var body: some Scene { WindowGroup { - RootTabView() + SplashView() // <--- Updated: Set SplashView as the initial entry point .tint(AppColor.brand) .environmentObject(regionChecker) .environmentObject(notificationManager)