質問編集履歴

3

エラー箇所の提示

2021/08/29 09:44

投稿

syabc124
syabc124

スコア0

test CHANGED
File without changes
test CHANGED
@@ -10,6 +10,8 @@
10
10
 
11
11
  error1:Missing argument label 'contentsOf:' in call
12
12
 
13
+ 場所:ContentViewModelのコメントアウト部
14
+
13
15
  ### 該当のソースコード
14
16
 
15
17
  ```TabbarApp

2

error場所をわかりやすく訂正

2021/08/29 09:44

投稿

syabc124
syabc124

スコア0

test CHANGED
File without changes
test CHANGED
@@ -10,10 +10,6 @@
10
10
 
11
11
  error1:Missing argument label 'contentsOf:' in call
12
12
 
13
- error2:Missing argument for parameter 'time' in call
14
-
15
- error3:Cannot convert value of type 'City' to expected argument type 'String'
16
-
17
13
  ### 該当のソースコード
18
14
 
19
15
  ```TabbarApp
@@ -60,7 +56,7 @@
60
56
 
61
57
  //WeatherViewの作成
62
58
 
63
- struct WeatherView: View{
59
+ struct ContentView: View{
64
60
 
65
61
  @StateObject var model = ContentViewModel()
66
62
 
@@ -76,7 +72,7 @@
76
72
 
77
73
  ForEach(model.cities){ city in
78
74
 
79
- CityOverview(city: city)###error2,error3###
75
+ CityOverview(city: city)
80
76
 
81
77
  }
82
78
 
@@ -176,7 +172,11 @@
176
172
 
177
173
  DispatchQueue.main.async {
178
174
 
175
+ ###############error1###################################
176
+
179
- self?.cities.append(city) ###error1###
177
+ self?.cities.append(city)
178
+
179
+ ########################################################
180
180
 
181
181
  }
182
182
 

1

Tabbarのコードも追加

2021/08/29 09:39

投稿

syabc124
syabc124

スコア0

test CHANGED
File without changes
test CHANGED
@@ -16,6 +16,30 @@
16
16
 
17
17
  ### 該当のソースコード
18
18
 
19
+ ```TabbarApp
20
+
21
+ import SwiftUI
22
+
23
+
24
+
25
+ @main
26
+
27
+ struct TabbarApp: App {
28
+
29
+ var body: some Scene {
30
+
31
+ WindowGroup {
32
+
33
+ ContentView()
34
+
35
+ }
36
+
37
+ }
38
+
39
+ }
40
+
41
+ ```
42
+
19
43
 
20
44
 
21
45
  ```ContentView
@@ -24,6 +48,18 @@
24
48
 
25
49
 
26
50
 
51
+ //ScheduleViewの作成
52
+
53
+ 割愛
54
+
55
+ //WantToListViewの作成
56
+
57
+ 割愛
58
+
59
+ //_____________________________________________________________________
60
+
61
+ //WeatherViewの作成
62
+
27
63
  struct WeatherView: View{
28
64
 
29
65
  @StateObject var model = ContentViewModel()
@@ -40,7 +76,7 @@
40
76
 
41
77
  ForEach(model.cities){ city in
42
78
 
43
- CityOverview(city: city) ###erroe2,error3###
79
+ CityOverview(city: city)###error2,error3###
44
80
 
45
81
  }
46
82
 
@@ -66,7 +102,15 @@
66
102
 
67
103
  }
68
104
 
69
-
105
+ //_____________________________________________________________________
106
+
107
+ //ChatListViewの作成
108
+
109
+ 割愛
110
+
111
+ //Tab barの設定
112
+
113
+ 割愛
70
114
 
71
115
  struct ContentView_Previews: PreviewProvider {
72
116