回答編集履歴

1

コード追記

2019/08/15 13:50

投稿

toki_td
toki_td

スコア2850

test CHANGED
@@ -19,3 +19,23 @@
19
19
  dequeueReusableCellで取得したセルを返すようにしてください。
20
20
 
21
21
  staticなUITableViewでない限り、ほとんどのケースでUITableViewがメンバ変数になることはないはずです。(その設計は大抵潜在的な問題があります)
22
+
23
+
24
+
25
+ **追記**
26
+
27
+ ```Swift
28
+
29
+ func tableView(_ tableView: UITableView, cellForRowAt indexPath:IndexPath) -> UITableViewCell
30
+
31
+ {
32
+
33
+ let cell = tableView.dequeueReusableCell(withIdentifier:"cell", for:indexPath)
34
+
35
+ cell.textLabel!.text = TODO[indexPath.row]
36
+
37
+ return cell
38
+
39
+ }
40
+
41
+ ```