Skip to content
Closed
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
45 changes: 45 additions & 0 deletions Outspire/SplashView.swift
Original file line number Diff line number Diff line change
@@ -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
}
}
}
}
}
}
Loading