質問編集履歴
1
コードの追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -35,4 +35,39 @@
|
|
35
35
|
print("タイトル: \(s.Title),日付:\(s.Date),サイト名:\(s.SiteName),リンク:\(s.Link)")
|
36
36
|
}
|
37
37
|
}
|
38
|
+
```
|
38
39
|
|
40
|
+
```swiftui
|
41
|
+
struct Matome: View {
|
42
|
+
var list: () = ListCreate()
|
43
|
+
|
44
|
+
var body: some View {
|
45
|
+
NavigationStack{
|
46
|
+
List{
|
47
|
+
ForEach(0..<DataList.count, id: \.self){ index in
|
48
|
+
NavigationLink(destination:OpenWeb(url:DataList[index].Link)){
|
49
|
+
HStack{
|
50
|
+
URLImageView(viewModel: .init(url:DataList[index].Image))
|
51
|
+
.frame(width:60, height:45)
|
52
|
+
VStack{
|
53
|
+
Text(DataList[index].Title).font(.subheadline).truncationMode(.tail)
|
54
|
+
HStack{
|
55
|
+
Text(DataList[index].SiteName).font(.caption)
|
56
|
+
Text(DataList[index].Date).font(.caption)
|
57
|
+
}
|
58
|
+
|
59
|
+
}
|
60
|
+
}
|
61
|
+
}//navigationlink
|
62
|
+
}.frame(height:60)//foreach
|
63
|
+
|
64
|
+
}.navigationBarTitle("まとめ",displayMode: .inline).refreshable {
|
65
|
+
ListCreate()
|
66
|
+
}
|
67
|
+
} //navigationstack
|
68
|
+
|
69
|
+
}
|
70
|
+
}
|
71
|
+
|
72
|
+
|
73
|
+
```
|