私は決してこのプリントを取得しません。これがあるので、あなたはcellForRowメソッドからあなたの携帯を返していない...tableView.cellForRow(at:indexPath)常にnilですか?
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell : RestCell = tableView.dequeueReusableCell(withIdentifier: "Cell", for: indexPath) as! RestCell
// Pass data to Cell :) clean the mess at the View Controller ;)
cell.restData = items[indexPath.row]
// Send cell so it can check update the image to the right cell ;)
// cell.cell = tableView.cellForRow(at: indexPath) as? RestCell
//print("LA CELDA ES \(tableView.cellForRow(at: indexPath))")
if let update = tableView.cellForRow(at: indexPath) as? RestCell {
print("VISIBLE CELL")
}
return cell
}
なぜ 'cellForRowAt'データソースメソッドの中で' cellForRow(at:) 'を呼び出すのですか?あなたはその線で何を達成しようとしていますか? – rmaddy
'cell' **は**あなたが探している細胞です。 – vadian
私はそれについて考えていました。あなたの実際の問題を見てください。https://stackoverflow.com/questions/46901059/uitableviewcell-subclass-wrong-image-in-cell-or -old-image-bug –