teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

3

書式の改善

2021/03/27 06:47

投稿

pi.chan_san
pi.chan_san

スコア3

title CHANGED
File without changes
body CHANGED
@@ -7,7 +7,7 @@
7
7
  分かる方、お力添えよろしくお願いします。
8
8
 
9
9
  ### 該当のソースコード
10
- リストに表示するデータはmodelファイル`RecipeModel`にあるdictionary`commonDictionary`から取ってきています。
10
+ リストに表示するデータはmodelファイル`RecipeModel.swift`にあるdictionary`commonDictionary`から取ってきています。
11
11
  ```ShoppingTableViewController
12
12
  import UIKit
13
13
 

2

書式の改善

2021/03/27 06:47

投稿

pi.chan_san
pi.chan_san

スコア3

title CHANGED
File without changes
body CHANGED
@@ -7,7 +7,7 @@
7
7
  分かる方、お力添えよろしくお願いします。
8
8
 
9
9
  ### 該当のソースコード
10
- リストに表示するデータはmodelファイルにあるdictionary`commonDictionary`から取ってきています。
10
+ リストに表示するデータはmodelファイル`RecipeModel`にあるdictionary`commonDictionary`から取ってきています。
11
11
  ```ShoppingTableViewController
12
12
  import UIKit
13
13
 

1

情報の追加

2021/03/27 06:12

投稿

pi.chan_san
pi.chan_san

スコア3

title CHANGED
File without changes
body CHANGED
@@ -8,7 +8,7 @@
8
8
 
9
9
  ### 該当のソースコード
10
10
  リストに表示するデータはmodelファイルにあるdictionary`commonDictionary`から取ってきています。
11
- ```Swift
11
+ ```ShoppingTableViewController
12
12
  import UIKit
13
13
 
14
14
  class ShoppingTableViewController: UIViewController,UITableViewDelegate, UITableViewDataSource {
@@ -82,7 +82,33 @@
82
82
  }
83
83
  }
84
84
  ```
85
+ ```RecipeModel
86
+ import UIKit
85
87
 
88
+ var key2021323 = "2021/03/23(Tue)"
89
+ var keyName = "common_name"
90
+ var keyPath = "common_imagePath"
91
+ var keyTime = "common_time"
92
+ var keyCalorie = "common_calorie"
93
+ var keyIngList = "common_ingredients"
94
+ var keyIngName = "name"
95
+ var keyIngQ = "quantity"
96
+
97
+ let commonDictionary = [
98
+ "2021/03/23(Tue)": ["common_name": "soba",
99
+ "common_imagePath": "unnamed.jpg",
100
+ "common_time": "20 minutes",
101
+ "common_calorie": "200 calorie",
102
+ "common_ingredients": [["name": "water",
103
+ "quanitity": "500cc"],
104
+ ["name": "soba",
105
+ "quantity": "2 or 3 bundle"],
106
+ ["name":"mentsuyu",
107
+ "quantity":"150cc"]]
108
+ ]
109
+ ]
110
+ ```
111
+
86
112
  追記:あと、できればセルを押した後選択が解除されるようにしたいです。
87
113
 
88
114
  ### 補足情報(FW/ツールのバージョンなど)