-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSplashScreenView.swift
52 lines (45 loc) · 1.25 KB
/
SplashScreenView.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
//
// SplashScreenView.swift
// ATSPro
//
// Created by User2 on 29/04/24.
//
import SwiftUI
struct SplashScreenView: View {
@State private var isActive = false
@State private var size = 0.8
@State private var opacity = 0.5
var body: some View {
if isActive {
ContentView()
}
else {
VStack{
VStack{
Image(systemName: "folder.fill")
.font(.system(size: 80))
.foregroundColor(.blue)
Text("ATSPro")
.font(Font.custom("Baskerille-Bold", size: 26))
.foregroundColor(.black.opacity(0.80))
}
.scaleEffect(size)
.opacity(opacity)
.onAppear {
withAnimation(.easeIn(duration: 1.2)) {
self.size = 0.9
self.opacity = 1.0
}
}
}
.onAppear{
DispatchQueue.main.asyncAfter(deadline: .now() + 2.0) {
self.isActive = true
}
}
}
}
}
#Preview {
SplashScreenView()
}