Storyboard segue gets called before UITableView's didSelectRow
didselectrowatindexpath, ios, storyboard, tableview
Solution
Don't create the Segue from the Cell to the new VC, instead set the Segue from the old VC to the new VC and give the segue an identifier.
Then within
`didSelectRowAtIndexPath` you can call
`[self performSegueWithIdentifier:@"Segue" sender:self]`
Problem
I have a storyboard with segue from a table cell. I want to set some properties with some data when a row gets selected so I do the following: ``` - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { [[ProperyManager sharedPropertyManager]setSelectedRow:[verseIds objectAtIndex:indexPath.row]]; [[ProperyManager sharedPropertyManager]setID:[poemIDs objectAtIndex:indexPath.row]]; [[ProperyManager sharedPropertyManager]setRowToReturn:[NSString stringWithFormat:@"%i",indexPath.row]]; } ``` The problem is, the view controller lifecycle methods (viewWillAppear etc.) of the destination view controller get called before the didSelectRow method above, because the segue pushes the view before the delegate method is executed. How can I get around this?