Reputation: 3
I have some data in TableView. What I want is to call services just after user tapped on row. Main problem is that 'performToSegue' is calling first so there is no data to populate in tableView in destination controller.
How can I call segue just after data has been retrieved?
Thanks a lot for suggestions!
Upvotes: 0
Views: 254
Reputation: 38728
Now in the UITableViewController
implement
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
// Do some network request
// on completion call
[self performSegueWithIdentifier:@"theIdentifierUsedInStoryboard" sender:self];
}
Upvotes: 1