-
-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathAppSymbol.swift
102 lines (94 loc) · 3.27 KB
/
AppSymbol.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
102
import SwiftUI
struct AppSymbol: View {
@Environment(\.colorScheme) var colorScheme
private var invertedColorScheme: ColorScheme {
colorScheme == .dark ? .light : .dark
}
var body: some View {
appOutline()
.cornerRadius(8.0)
.padding()
}
@ViewBuilder
func appOutline() -> some View {
ZStack {
// GeometryReader { proxy in
// RoundedRectangle(cornerRadius: 8)
// .stroke(Color.white)
// // Horizontal lines
//
// Path { path in
// path.move(to: CGPoint(x: 2, y: 2))
// path.addLine(to: CGPoint(x: proxy.size.width - 2,
// y: proxy.size.height - 2))
// }.stroke(Color.white.opacity(0.6), lineWidth: 0.75)
//
// Path { path in
// path.move(to: CGPoint(x: 2, y: proxy.size.width - 2))
// path.addLine(to: CGPoint(x: proxy.size.width - 2,
// y: 2))
// }.stroke(Color.white.opacity(0.6), lineWidth: 0.75)
//
// Path { path in
// path.move(to: CGPoint(x: 0, y: proxy.size.height * 0.25))
// path.addLine(to: CGPoint(x: proxy.size.width,
// y: proxy.size.height * 0.25))
// }.stroke(Color.white.opacity(0.6), lineWidth: 0.75)
//
// Path { path in
// path.move(to: CGPoint(x: 0, y: proxy.size.height * 0.5))
// path.addLine(to: CGPoint(x: proxy.size.width,
// y: proxy.size.height * 0.5))
// }.stroke(Color.white.opacity(0.6), lineWidth: 0.75)
//
// Path { path in
// path.move(to: CGPoint(x: 0, y: proxy.size.height * 0.75))
// path.addLine(to: CGPoint(x: proxy.size.width,
// y: proxy.size.height * 0.75))
// }.stroke(Color.white.opacity(0.6), lineWidth: 0.75)
//
// // Vertical lines
//
// Path { path in
// path.move(to: CGPoint(x: proxy.size.height * 0.25, y: 2))
// path.addLine(to: CGPoint(x: proxy.size.height * 0.25,
// y: proxy.size.height))
// }.stroke(Color.white.opacity(0.6), lineWidth: 0.75)
//
// Path { path in
// path.move(to: CGPoint(x: proxy.size.height * 0.5, y: 2))
// path.addLine(to: CGPoint(x: proxy.size.height * 0.5,
// y: proxy.size.height))
// }.stroke(Color.white.opacity(0.6), lineWidth: 0.75)
//
// Path { path in
// path.move(to: CGPoint(x: proxy.size.height * 0.75, y: 2))
// path.addLine(to: CGPoint(x: proxy.size.height * 0.75,
// y: proxy.size.height))
// }.stroke(Color.white.opacity(0.6), lineWidth: 0.75)
// }
Circle()
.stroke(Color.white, lineWidth: 0.75)
.frame(width: 30, height: 30)
.opacity(0.6)
Circle()
.stroke(Color.white, lineWidth: 0.75)
.frame(width: 24, height: 24)
.opacity(0.4)
Circle()
.stroke(Color.white, lineWidth: 0.75)
.frame(width: 12, height: 12)
.opacity(0.4)
}
}
}
struct AppSymbol_Previews: PreviewProvider {
static var previews: some View {
ZStack {
AppSymbol()
.background(Color.red)
}
.padding()
.frame(width: 64, height: 64)
}
}