-
Notifications
You must be signed in to change notification settings - Fork 264
/
Copy pathSplashView.swift
49 lines (43 loc) · 1.44 KB
/
SplashView.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
//
// SplashView.swift
import SwiftUI
struct SplashView: View {
@State private var innerGap = true
let streamBlue = Color(#colorLiteral(red: 0, green: 0.3725490196, blue: 1, alpha: 1))
var body: some View {
ZStack {
ForEach(0..<8) {
Circle()
.foregroundStyle(
.linearGradient(
colors: [.green, .red],
startPoint: .bottom,
endPoint: .leading
)
)
.frame(width: 3, height: 3)
.offset(x: innerGap ? 24 : 0)
.rotationEffect(.degrees(Double($0) * 45))
.hueRotation(.degrees(300))
}
ForEach(0..<8) {
Circle()
.foregroundStyle(
.linearGradient(
colors: [.green, streamBlue],
startPoint: .bottom,
endPoint: .leading
)
)
.frame(width: 4, height: 4)
.offset(x: innerGap ? 26 : 0)
.rotationEffect(.degrees(Double($0) * 45))
.hueRotation(.degrees(60))
}
.rotationEffect(.degrees(12))
}
}
}
#Preview {
SplashView()
}