How to disable selected table cell highlight after returning from Detail View (Back Segue)

swift, uitableview

Solution

I got it now. I solved like this. It's simple theory.

We just deselect it when we select the row

func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
    tableView.deselectRow(at: indexPath, animated: true)
}

Problem

I am having problem with my table view cell. I can't disable the highlight of table cell selection after returning from detail view to main table view using segue with embedded navigation controller. The table cell is still selected. I don't want the table cell selection to be disable when I click one of them to show the detail. I only want to disable them after I returning back from detail view.

Original source