8
Is it able to acces selected row position in a sectioned table view within a prepareForSegue method?
This is my code for Segue:
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
if ([[segue identifier] isEqualToString:@"CurrentEvent"]) {
Tab1_DetailTableViewController *vc = [segue destinationViewController];
// get the selected index
NSInteger selectedIndex = [[self.tableView indexPathForSelectedRow] row];
}
}
I looked up several methods to acces the position directly, but i didn't find one. I think I have overseen something. Does anybody know a way?