Ok so what do I want to achieve: I have a table view controller and a normal view controller. In the table view controller there a bunch of values from an array.
What I want: when the user selects a cell with the value of a particular array I want the view controller to display detailinfo about that cell.
For some reason dragging the segue in the storyboard doesn't really work, I can drag it but it doesn't push the screen of the second viewcontroller when I select a cell.
This is the code I have to solve this + I thought about adding an indicator of which cell was tapped. But when the second view controller is loaded the pickedRow value = 0 again.
This is the code for the FirstViewController.m
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
SecondViewController *secondView = [[SecondViewController alloc]init];
secondView.pickedRow = indexPath.row;
[self performSegueWithIdentifier: @"artiestenDetailSegue" sender: self];
}
In the viewDidLoad of SecondViewController I have this, this just always returns 0:
if (pickedRow == 1) {
detailLabel.text = @"eerste";
}
Everything is imported correctly and no errors. What could the issue be?