I'm working on a UITableView that acts like checklist. I need to display checkmark when UITableViewCell
tapped and hide the checkmark when UITableViewCell tapped again. I've tried this solution but I couldn't build because of var checked = [Bool]()
part. How can I solve it with another way?
EDIT I've added the code below to cellForRowAtIndexPath
if checked == true {
cell.accessoryType = .None
checked = false
} else if checked == false {
cell.accessoryType = .Checkmark
checked = true
}