I have four view controllers:
- VC1
- VC2 that contains a childViewController (VC3)
- VC4
This is the workflow:
- VC1 shows (push) VC2, loading also VC3.
- a. It is possible to go back to VC1 with an unwind segue that it is working fine.
- b. VC3 has some buttons that shows (push) VC4.
- VC4 has a selectable list.
I want to go back with selected row to VC1, so I have implemented an unwind method to return from VC4 to VC2, and then, inside unwindToVC2 method, I am calling another segue:
[self performSegueWithIdentifier:@"returnToVC1"];
But this segue is not being called or it is not working.
Trying to debug the problem, the app goes back perfectly to VC2, and it calls the "returnToVC1" segue but nothing ocurrs, and it doesn't throw any error.
Searching for a fix, I have found that unwind method is called before the presented view has disappear. Is it the cause of the problem? is it not possible to unwind VC2 because VC4 is still visible?
Is there any way to go back two View Controllers sending info?
Thank you