I want to cancel which cell was selected. When clicking on the selected cell, it sends the idCategoria to the next view, but when you return it, the cell is still selected and when you want to click on another category it shows those of the previous category
func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
tableView.deselectRowAtIndexPath(indexPath, animated: true)
print(indexPath)
vcName = values[indexPath.item]["idCategoria"] as! String
//tableView.deselectRowAtIndexPath(indexPath, animated: true)
//self.performSegueWithIdentifier("show", sender: indexPath);
//tableView.reloadData()
}
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject!) {
if (segue.identifier == "show") {
if let vc: ViewController = segue.destinationViewController as? ViewController {
vc.idCategoria = vcName
}
}
}