mirror of
https://github.com/cranci1/Sora.git
synced 2026-01-11 20:10:24 +00:00
42 lines
1.2 KiB
Swift
42 lines
1.2 KiB
Swift
//
|
|
// SplashScreenView.swift
|
|
// Sora
|
|
//
|
|
// Created by paul on 11/06/25.
|
|
//
|
|
|
|
import SwiftUI
|
|
|
|
struct SplashScreenView: View {
|
|
@State private var isAnimating = false
|
|
@State private var showMainApp = false
|
|
|
|
var body: some View {
|
|
ZStack {
|
|
if showMainApp {
|
|
ContentView()
|
|
} else {
|
|
VStack {
|
|
Image("SplashScreenIcon")
|
|
.resizable()
|
|
.scaledToFit()
|
|
.frame(width: 200, height: 200)
|
|
.cornerRadius(24)
|
|
.scaleEffect(isAnimating ? 1.2 : 1.0)
|
|
.opacity(isAnimating ? 1.0 : 0.0)
|
|
}
|
|
.onAppear {
|
|
withAnimation(.easeIn(duration: 0.5)) {
|
|
isAnimating = true
|
|
}
|
|
|
|
DispatchQueue.main.asyncAfter(deadline: .now() + 0.25) {
|
|
withAnimation(.easeOut(duration: 0.5)) {
|
|
showMainApp = true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|