Group Group Group Group Group Group Group Group Group

Checklist PDF code issue on page 368 "makeCell"


On page 368 of iOS 7 PDF there is a line that states
let cell = MakeCell(for: tableView)
it sends up a red unresolved identifier alert. I do not see the need for this local scope line as the app builds without it. The full method code is below

override func tableView(_ tableView: UITableView,
cellForRowAt indexPath: IndexPath)
-> UITableViewCell {
let cell = makeCell(for: tableView)
// Update cell information
let checklist = lists[indexPath.row]
cell.textLabel!.text =
cell.accessoryType = .detailDisclosureButton
return cell


Sorry about that, the line that should be there is:

let cell = tableView.dequeueReusableCell(withIdentifier: cellIdentifier, for: indexPath)

You should find the correct code in the source projects included with the file. If in doubt, I’d suggest checking the source projects first :slight_smile:


Thanks Fahim. It was fun to figure out. I thought I would send it in so that it could be added to changes required in the PDF version.


Just hit the this part, it should be changed.


@seanec @dthai93 Thank you for the heads up - much appreciated!


correct me if I’m wrong please; but the fact that this error is in the book proves? that nobody bothered to proof read it before publication?

opened #8

@chiangmai50000 We will fix this in the next version of the book. Thank you!