Check out example codes for "deselect cell swift". It will help you in understanding the concepts better.

Code Example 1

override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
    //Change the selected background view of the cell.
    tableView.deselectRow(at: indexPath, animated: true)
}

Learn ReactJs, React Native from akashmittal.com