Beginning Table Views · Challenge: Adding a Label | Ray Wenderlich


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/5995-beginning-table-views/lessons/5

This is the second video in a row that I’ve experienced choppy audio playback. I’m currently watching using Safari as my browser. Any ideas on what might be causing this issue?

@vincentk42 Do you still have issues with this?

I created custom class for cells just for educational purposes:
class CustomCell: UITableViewCell {
override func prepareForReuse() {
super.prepareForReuse()
print(“Prepared for reuse”)
}
}

then registered it in viewDidLoad():
tableView.register(CustomCell.self, forCellReuseIdentifier: “ChecklistItem”)

and casted type in tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell:
let cell = tableView.dequeueReusableCell(withIdentifier: “ChecklistItem”, for: indexPath) as! CustomCell

After code changes mentioned above tasks’ names vanished. I mean - let label = cell.viewWithTag(1000) as? UILabel turned nil.

Please help to fix the problem.

@andreysvx Do you still have issues with this?

Yes, unfortunately =(

What are you having issues with? The code that you pasted, or the audio playback?

the code - not the playback.

@andreysvx What issues do you have with it exactly?

No, everything is ok now!