6245Htarwara 6245Htarwara - 4 months ago 38
Swift Question

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

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.

Please Help!!


I got it now.I solved like this.

func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
    yourTableView.deselectRowAtIndexPath(indexPath, animated: true)