Input: xcode 12.0. UIKIt Apprentice First Edition
I finished a few steps on Chapter 9 where override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) โ UITableViewCell {} were update with
let cell = tableView.dequeueReusableCell(
withIdentifier: "ChecklistItem",
for: indexPath)
// Add the following code
let label = cell.viewWithTag(1000) as! UILabel
When I run my code I got an error message : Checklists/ChecklistViewController.swift:32: Fatal error: Unexpectedly found nil while unwrapping an Optional value
2022-02-11 16:47:52.706024+0100 Checklists[11880:1475402] Checklists/ChecklistViewController.swift:32: Fatal error: Unexpectedly found nil while unwrapping an Optional value
But Iโm bot sure how to unwrap the label variable correctly. How is it possible to solve?