0

I am working with 2 viewcontrollers and I am simply trying to do an unwind segue between the second and first viewcontrollers. My code for performing the segue does not throw any errors, but also dosen't do anything.

-(void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
//get which one it is and send it back to the other viewcontroller!!!!

NSArray *tempComboArray = [[userCombosReadIn objectAtIndex:indexPath.row] componentsSeparatedByString:@","];
tempSelectName = [tempComboArray objectAtIndex:0];

for (int i = 0; i < [userCombosReadIn count]; i++) {
    NSArray *tempCompareArray = [[userCombosReadIn objectAtIndex:i] componentsSeparatedByString:@","];
    if ([tempSelectName isEqualToString:[tempCompareArray objectAtIndex:0]]) {
        self.selectedComboString = [userCombosReadIn objectAtIndex:i];
        break;
    }
}

[self performSegueWithIdentifier:@"returnToBuildScreen" sender:self];
}

is the code that I use to call the unwind segue. I make the unwind segue by control dragging from the orange viewcontroller icon to the exit icon, then naming the unwind segue in the project outline. The outline calls in "unwind segue to Scene Exit placeholder". I dont know if that is wrong, or significant etc. The segue identifier is returnToBuildScreen and the action is returnToBuildScreen:.

In the .h file of the viewController I have a method that I think handles the unwinding segue, but I think thats where the issue may be

-(IBAction)returnToBuildScreen:(UIStoryboardSegue *)segue;

the circle next to the method declaration in the .h file is not filled in, which usually means it is not connected to anything in IB... I have an implementation for it in the .m file with a basic nslog function for debug purposes.

Like I said, It runs error free, but does nothing

Thanks in Advance

chargerstriker
  • 486
  • 1
  • 5
  • 20
  • The circle isn't filled in on my unwind segue either. Think that's normal. Try naming your segue beginning with "unwind". – Mike Taverne Dec 30 '14 at 02:31
  • Also, add a stub to your .m that implements the method defined in your .h. It doesn't need to have any code in it, but it needs to be there as far as I recall. – Mike Taverne Dec 30 '14 at 02:33
  • I tried that, already had the stub in the .m file. Renaming to unwind didnt work unfortunately – chargerstriker Dec 30 '14 at 02:42
  • This is what helped me when I needed to set up my unwind segue http://stackoverflow.com/questions/12561735/what-are-unwind-segues-for-and-how-do-you-use-them – Mike Taverne Dec 30 '14 at 03:31
  • It sounds like you did everything correctly. It should say "unwind segue to Scene Exit placeholder", and the circle next to the method declaration should be empty (that's normal for an unwind). Are you sure that the code execution reaches the line where you call performSegue? – rdelmar Dec 30 '14 at 06:44

0 Answers0