-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSplashScreen.swift
More file actions
41 lines (36 loc) · 1 KB
/
SplashScreen.swift
File metadata and controls
41 lines (36 loc) · 1 KB
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
//
// SplashScreen.swift
// StudyApp
//
// Created by Kevin Mello on 8/27/25.
//
import SwiftUI
struct SplashScreen: View {
@State private var logoScale: CGFloat = 0.6
@State private var logoOpacity: Double = 0.5
var body: some View {
ZStack {
Color.black.ignoresSafeArea()
Image("Logo") // your PNG asset
.resizable()
.scaledToFit()
.frame(width: 150, height: 150)
.scaleEffect(logoScale)
.opacity(logoOpacity)
.onAppear {
withAnimation(.easeOut(duration: 0.8)) {
logoScale = 1.2
logoOpacity = 1.0
}
withAnimation(.easeInOut(duration: 0.6).delay(0.8)) {
logoScale = 1.0
}
}
}
}
}
struct SplashScreen_Previews: PreviewProvider {
static var previews: some View {
SplashScreen()
}
}