I have 4 ViewControllers. Three of those view controllers are connected to the fourth one, which I call Photo_Detail. The segues there work fine, but now I have to make the back button go to the VC that someone came from. How can I do that? A research said to create a unwind segue in the Photo_detail, what i did but it didn't work out. That's the code I tried to use:
- (IBAction)done:(UIStoryboardSegue *)segue {
NSLog(@"Popping back to this view controller!");
// reset UI elements etc here
}
Thanks for any help in advance!
For Modal type segues, this will help you to move back.
And also select it as normal action from
ViewController
rather thenexit
. That will fix it.Hope this helps.