You wrote:
"Unless you call reloadRows(at:with:) or reloadData() (generally, reloadData() is too much just for updating a single cell), UITableView would not update the cell, meaning tableView(_:cellForRowAt:) would not be called."
I understand that. My question is about something else - why is the same operation performed differently?
Inside the cellForRowAt method, I can create a separate constant to hold the item from array and then check its isSelected property.
let food = foods[indexPath.row]
if food.isSelected {...
But inside the didSelectRowAt method, this code does not work and I need to retrieve an item from the original array on the fly to check its isSelected property.
if foods[indexPath].isSelected...
What could be the reason here? Any ideas please