I have a storyboard that has a starting view controller that presents other modal view controllers.
Say view controller A is the startingViewController, and view controller B is the modally presented view controller.
How can I trigger the unwind segue from B back to A, from ViewController A ( not just from a button located on ViewController B)?
The button works to perform the unwind segue , but when I try to perform it programmatically using
[self performSegueWithIdentifier:@"ReturnToStart" sender:self]
an error occurs:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Receiver (<StartViewController: 0x1ed4b9b0>) has no segue with identifier 'ReturnToStart''
What I don't understand is that the unwind segue is working fine when I press a button on the modal view controller, but the segue just can't be found when I attempt to trigger it from another ViewController (The identifier is correct in storyboard).
Is there any way of accessing all of the segues from my startingViewController or is my structure fundamentally wrong?