Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Outspire/OutspireApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
44 changes: 44 additions & 0 deletions Outspire/SplashView.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import SwiftUI

struct SplashView: View {
@State private var isActive = false
@State private var opacity = 0.0

var body: some View {
if isActive {
RootTabView()
} else {
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 {
withAnimation(.easeIn(duration: 1.0)) {
opacity = 1.0
}

DispatchQueue.main.asyncAfter(deadline: .now() + 2.5) {
withAnimation {
isActive = true
}
}
}
}
}
}

struct SplashView_Previews: PreviewProvider {
static var previews: some View {
SplashView()
}
}
Loading