I have a table with several sections and lines in each section.
When selecting, I want each item in the table to have its own view controller. I have a given each identifiers.
The following code always opens the same new view controllers, ignoring my if function to make the segue dependent on which cell the user selects. At the moment I am testing with only two but once it works i will add more.
Does anyone know why this happens?
override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
if indexPath == 1 {
self.performSegueWithIdentifier("Belgium", sender: self)
}
else {
self.performSegueWithIdentifier("France", sender: self)
}