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/3] 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/3] 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) From d6dae547bf2267d2112453c10b3fe14ca428cd2b 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:51:35 +0800 Subject: [PATCH 3/3] Refactor SplashView to use RootTabView and update UI --- Outspire/SplashView.swift | 51 +++++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 26 deletions(-) diff --git a/Outspire/SplashView.swift b/Outspire/SplashView.swift index 1384d87..5924a6d 100644 --- a/Outspire/SplashView.swift +++ b/Outspire/SplashView.swift @@ -2,44 +2,43 @@ import SwiftUI struct SplashView: View { @State private var isActive = false - @State private var size = 0.8 - @State private var opacity = 0.5 + @State private var opacity = 0.0 var body: some View { if isActive { - // Replace with your actual Main ContentView - ContentView() + RootTabView() } 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 - } - } + VStack(spacing: 16) { + Text("Outspire") + .font(.system(size: 52, weight: .bold, design: .rounded)) + .foregroundColor(.primary) + + Text("All-in-one Campus App for WFLA") + .font(.system(size: 18, weight: .medium)) + .foregroundColor(.secondary) + .multilineTextAlignment(.center) + .padding(.horizontal, 32) } + .opacity(opacity) .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(.easeIn(duration: 1.0)) { + opacity = 1.0 + } + + DispatchQueue.main.asyncAfter(deadline: .now() + 2.5) { withAnimation { - self.isActive = true + isActive = true } } } } } } + +struct SplashView_Previews: PreviewProvider { + static var previews: some View { + SplashView() + } +}