I just been through the array lesson everything look correct but I am getting two errors that I can’t seem to trouble shoot.
First is incorrect argument label it wants me to use “at:”
if let cell = tableView.cellForRow(at: indexPath) {
let item = items[indexPath.row]
item.toggleChecked()
configureCheckmark(for: cell, with: item)
}
tableView.deselectRow(at: indexPath, animated: true)
}
Next is unresolved identifier ‘item’
func configureCheckmark(for cell: UITableViewCell,
at indexPath: ChecklistItem) {
if item.checked {
cell.accessoryType = .checkmark
}else {
cell.accessoryType = .none
}
}
Any help with these issue I been stuck for two days, I can’t find the bug.
Thanks