-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathInformationView.swift
101 lines (80 loc) · 4.24 KB
/
InformationView.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
import SwiftUI
struct InformationView: View {
@EnvironmentObject var myData: MyData
var body: some View {
VStack{
HStack{
Spacer()
Button(action: {
myData.showInformation = false
}, label:{
Image(systemName: "xmark")
.font(.title)
.foregroundColor(.gray)
.padding()
}
)
}
.padding()
VStack(alignment: .leading){
Text("Developer : Terry Koo")
.font(.title)
Text("Contact : xpflxhfl94@naver.com")
.font(.title)
}
ZStack{
//circle
GeometryReader{ geometry in
let radius: Double = geometry.size.width * 0.2
let centerPoint = CGPoint(x: geometry.size.width/2, y: geometry.size.height/2)
Arc(startAngle: .degrees(105), endAngle: .degrees(135), clockwise: false,
radius: radius, centerPoint: centerPoint)
.stroke(Color("blue-violet"), lineWidth: 50)
Arc(startAngle: .degrees(75), endAngle: .degrees(105), clockwise: false,
radius: radius, centerPoint: centerPoint)
.stroke(Color("violet"), lineWidth: 50)
Arc(startAngle: .degrees(45), endAngle: .degrees(75), clockwise: false,
radius: radius, centerPoint: centerPoint)
.stroke(Color("red-violet"), lineWidth: 50)
Arc(startAngle: .degrees(15), endAngle: .degrees(45), clockwise: false,
radius: radius, centerPoint: centerPoint)
.stroke(Color("red"), lineWidth: 50)
Arc(startAngle: .degrees(345), endAngle: .degrees(15), clockwise: false,
radius: radius, centerPoint: centerPoint)
.stroke(Color("red-orange"), lineWidth: 50)
Arc(startAngle: .degrees(315), endAngle: .degrees(345), clockwise: false,
radius: radius, centerPoint: centerPoint)
.stroke(Color("orange"), lineWidth: 50)
}
// circle
GeometryReader{ geometry in
let radius: Double = geometry.size.width * 0.2
let centerPoint = CGPoint(x: geometry.size.width/2, y: geometry.size.height/2)
Arc(startAngle: .degrees(285), endAngle: .degrees(315), clockwise: false,
radius: radius, centerPoint: centerPoint)
.stroke(Color("yellow-orange"), lineWidth: 50)
Arc(startAngle: .degrees(255), endAngle: .degrees(285), clockwise: false,
radius: radius, centerPoint: centerPoint)
.stroke(Color("yellow"), lineWidth: 50)
Arc(startAngle: .degrees(225), endAngle: .degrees(255), clockwise: false,
radius: radius, centerPoint: centerPoint)
.stroke(Color("yellow-green"), lineWidth: 50)
Arc(startAngle: .degrees(195), endAngle: .degrees(225), clockwise: false,
radius: radius, centerPoint: centerPoint)
.stroke(Color("green"), lineWidth: 50)
Arc(startAngle: .degrees(165), endAngle: .degrees(195), clockwise: false,
radius: radius, centerPoint: centerPoint)
.stroke(Color("blue-green"), lineWidth: 50)
Arc(startAngle: .degrees(135), endAngle: .degrees(165), clockwise: false,
radius: radius, centerPoint: centerPoint)
.stroke(Color("blue"), lineWidth: 50)
}
}
Spacer()
Text("Music: https://www.bensound.com\nDesigned by Freepik")
.foregroundColor(.gray)
.font(.caption2)
.padding()
}
}
}