質問編集履歴
2
コードが載らないため
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,6 +1,12 @@
|
|
1
1
|
### 前提
|
2
2
|
|
3
3
|
ListはNavigationLinkの中で使用しています。
|
4
|
+
|
5
|
+
var body: some View {
|
6
|
+
NavigationView {
|
7
|
+
List{Section(header: Text("テキスト")){ForEach(0..<self.pinned.count) {index in NavigationLink(destination: AnotherView, label: {Text(pinned[index])}}}}
|
8
|
+
}
|
9
|
+
}}
|
4
10
|
|
5
11
|
### 実現したいこと
|
6
12
|
|
1
訂正
test
CHANGED
File without changes
|
test
CHANGED
@@ -22,11 +22,11 @@
|
|
22
22
|
|
23
23
|
struct ContentView: View {
|
24
24
|
|
25
|
-
@State var
|
25
|
+
@State var pinned = [""]
|
26
26
|
|
27
27
|
var body: some View {
|
28
28
|
NavigationView {
|
29
|
-
List{Section(header: Text("テキスト")){ForEach(0..<self.
|
29
|
+
List{Section(header: Text("テキスト")){ForEach(0..<self.pinned.count) {index in NavigationLink(destination: AnotherView, label: {Text(pinned[index])}}}}
|
30
30
|
}
|
31
31
|
}}
|
32
32
|
|
@@ -52,3 +52,4 @@
|
|
52
52
|
### 補足情報(FW/ツールのバージョンなど)
|
53
53
|
|
54
54
|
Xcodeはバージョン14.1です。
|
55
|
+
|