I am working on a project on which I have to preselect a particular cell.
I can preselect a cell using -willDisplayCell, but I can\'t deselect it when t         
        
What I've found is that on top of setting the cell as selected, you have to let the table view know to select the row at the given index path.
// Swift 3+  
override func tableView(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath) {
    if appDelegate.indexPathDelegate.row == indexPath.row {
        self.tableView.selectRow(at: indexPath, animated: true, scrollPosition: .none)
        cell.setSelected(true, animated: true)
    }
}