UITableView Checkmarks disappear when scrolling

func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) ->    UITableViewCell{
var cell : UITableViewCell = .........
if(boolArray[indexPath.row){
    cell.accessoryType = UITableViewCellAccessoryType.Checkmark
} else {
    cell.accessoryType = UITableViewCellAccessoryType.None
}
}

Try this code.

Leave a Comment