質問編集履歴
2
画像を添付しました
test
CHANGED
File without changes
|
test
CHANGED
@@ -105,3 +105,5 @@
|
|
105
105
|
### 補足情報(FW/ツールのバージョンなど)
|
106
106
|
|
107
107
|
xcode13.1
|
108
|
+
|
109
|
+
![イメージ説明](b1285be6e482701e698d048497cdf6a7.png)
|
1
該当のソースコードを書き換えました
test
CHANGED
File without changes
|
test
CHANGED
@@ -24,6 +24,10 @@
|
|
24
24
|
|
25
25
|
|
26
26
|
|
27
|
+
import SwiftUI
|
28
|
+
|
29
|
+
|
30
|
+
|
27
31
|
struct MyEllipse: Shape{
|
28
32
|
|
29
33
|
func path( in rect: CGRect) -> Path{
|
@@ -37,6 +41,48 @@
|
|
37
41
|
}
|
38
42
|
|
39
43
|
}
|
44
|
+
|
45
|
+
|
46
|
+
|
47
|
+
struct Triangle: Shape{ //どこかで見たコードです
|
48
|
+
|
49
|
+
func path(in rect: CGRect) -> Path{
|
50
|
+
|
51
|
+
let path = Path()
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
return path
|
56
|
+
|
57
|
+
}
|
58
|
+
|
59
|
+
}
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
struct MyEllipseExample: View {
|
64
|
+
|
65
|
+
var body: some View {
|
66
|
+
|
67
|
+
Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/)
|
68
|
+
|
69
|
+
}
|
70
|
+
|
71
|
+
}
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
struct MyEllipseExample_Previews: PreviewProvider {
|
76
|
+
|
77
|
+
static var previews: some View {
|
78
|
+
|
79
|
+
MyEllipseExample()
|
80
|
+
|
81
|
+
}
|
82
|
+
|
83
|
+
}
|
84
|
+
|
85
|
+
|
40
86
|
|
41
87
|
|
42
88
|
|