File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ struct OutspireApp: App {
4242
4343 var body : some Scene {
4444 WindowGroup {
45- RootTabView ( )
45+ SplashView ( ) // <--- Updated: Set SplashView as the initial entry point
4646 . tint ( AppColor . brand)
4747 . environmentObject ( regionChecker)
4848 . environmentObject ( notificationManager)
Original file line number Diff line number Diff line change 1+ import SwiftUI
2+
3+ struct SplashView : View {
4+ @State private var isActive = false
5+ @State private var opacity = 0.0
6+
7+ var body : some View {
8+ if isActive {
9+ RootTabView ( )
10+ } else {
11+ VStack ( spacing: 16 ) {
12+ Text ( " Outspire " )
13+ . font ( . system( size: 52 , weight: . bold, design: . rounded) )
14+ . foregroundColor ( . primary)
15+
16+ Text ( " All-in-one Campus App for WFLA " )
17+ . font ( . system( size: 18 , weight: . medium) )
18+ . foregroundColor ( . secondary)
19+ . multilineTextAlignment ( . center)
20+ . padding ( . horizontal, 32 )
21+ }
22+ . opacity ( opacity)
23+ . frame ( maxWidth: . infinity, maxHeight: . infinity)
24+ . background ( Color ( UIColor . systemBackground) )
25+ . onAppear {
26+ withAnimation ( . easeIn( duration: 1.0 ) ) {
27+ opacity = 1.0
28+ }
29+
30+ DispatchQueue . main. asyncAfter ( deadline: . now( ) + 2.5 ) {
31+ withAnimation {
32+ isActive = true
33+ }
34+ }
35+ }
36+ }
37+ }
38+ }
39+
40+ struct SplashView_Previews : PreviewProvider {
41+ static var previews : some View {
42+ SplashView ( )
43+ }
44+ }
You can’t perform that action at this time.
0 commit comments