質問編集履歴

2

Setting(name: self.names[indexPath.row], delegate: self)を追加しました

2019/02/26 01:14

投稿

murakmixi
murakmixi

スコア26

test CHANGED
File without changes
test CHANGED
@@ -58,7 +58,7 @@
58
58
 
59
59
  let cell:TableViewCell = tableView.dequeueReusableCell(withIdentifier: "Cell", for: indexPath) as! TableViewCell
60
60
 
61
- cell.label.text = names[indexPath.row]
61
+      Setting(name: self.names[indexPath.row], delegate: self)
62
62
 
63
63
 
64
64
 

1

異なったバージョンのコードを載せていたので訂正させていただきました。訂正箇所は、cellForRowAt内です。

2019/02/26 01:14

投稿

murakmixi
murakmixi

スコア26

test CHANGED
File without changes
test CHANGED
@@ -56,9 +56,9 @@
56
56
 
57
57
  override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
58
58
 
59
- let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath)
59
+ let cell:TableViewCell = tableView.dequeueReusableCell(withIdentifier: "Cell", for: indexPath) as! TableViewCell
60
-
60
+
61
- cell.textLabel?.text = names[indexPath.row]
61
+ cell.label.text = names[indexPath.row]
62
62
 
63
63
 
64
64