0

I'm using Xcode 5 with storyboards and I should do something like this:

ViewController with a Start button that launches IntermediateViewController

IntermediateViewController that does an activity and then returns the value to the ViewController.

For the passage ViewController->IntermediateViewController I've set the start button to trigger a push segue. Actions are done and this part seems ok.

Now I have to go back to ViewController passing a string I got in IntermediateViewController methods.

If I use:

ViewController *viewController=[self.navigationController.storyboard instantiateViewControllerWithIdentifier:@"viewController"];
viewController.passedString=_mystring;
[self.navigationController pushViewController:viewController animated:NO];

I get this error: "Finishing up a navigation transition in an unexpected state. Navigation Bar subview tree might get corrupted"

Is there a way to retrieve my viewController first instance through its identifier or any other solution that will lead the app back to viewController setting also its variable? Thanks in advance

1 Answer 1

0

Even if it's not the exact answer to the question, I solved using this steps:

1) checked in storyboards that each element triggers only one action or segue, not both.

2) calling second view using:

[self.navigationController pushViewController:intermediateViewController animated:NO];

2) going back to previous view.

[self.navigationController popViewControllerAnimated:YES];

3) doing this before popping:

pass string between controllers

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.