I have to make checkmarks on a tableView, but if I\'m scrolling and one check marked cell is not visible and I scroll back the checkmark disappeared.
While running
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell
reuses cells as you can see from the code. You need to keep the state of your selected cells, and assign the accessory views state after var view = UITableViewCell ...
var view = UITableViewCell ...