It has been a while since I have done any iOS programming so please forgive me for the simple question. I have searched, and maybe I am just over thinking this.
I have a segue called ShowStreamDetails connecting dynamic prototype cells to a detail view that shows... details of the selected cell. Now I didn't know that the detail disclosure buttons was going to be troublesome. If I select the cell, it works correctly and passes objects to the detail view. If I press the detail disclosure indicator it goes to the detail view and that view then displays the first item on the list, instead of the actual item listed in the cell. So, here is what I have.
-(void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:
(NSIndexPath *)indexPath
{
[self performSegueWithIdentifier:@"ShowStreamDetails" sender:[self.tableView cellForRowAtIndexPath:indexPath]];
}
and the prepare for segue:
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
if ([[segue identifier] isEqualToString:@"ShowStreamDetails"])
{
StreamsDetailViewController *detailViewController = [segue destinationViewController];
detailViewController.streams = [self.dataController objectInListAtIndex:[self.tableView indexPathForSelectedRow].row];
}
}
How do I add this to the prepareForSegue: so that it passes the correct information?