App crashes when trying to perform custom segue

I'm relatively new to using Storyboards and very new to segue programming, and I'm encountering a problem with a custom segue that I'm trying to implement in my App; or more specifically, a problem when trying to use an unwind segue.


I've created two custom segues which are extending UIStoryboardSegue, CurlSegue and CurlSegueUnwind. In my Storyboard I have two ViewControllers, each associated with a class that is extending UIViewController. I connected a Button in the first ViewController to the second ViewController using a Control+Drag, selecting "custom" and specifying the identifier of my segue (i.e. CurlSegue). This works fine and my custom segue performs as expected without incident, bringing up the second ViewController.


To then get the reverse working -- following this documentation -- I added a method named "prepareForUnwind" to the first ViewController's associated class implementation with the signature below:


- (IBAction)prepareForUnWind:(UIStoryboardSegue *)segue


On the second ViewController (in my Storyboard), I Control+Drag'ed from the View Controller icon to the Exit icon and selected the method noted above. I then added a Button to the second ViewController and attached an IBAction defined in its associated class with the definition below, intended to programmatically call the unwind segue:


- (IBAction)dismissMe:(id)sender

{

NSLog(@"SecondViewController -> dismissMe");

[self performSegueWithIdentifier:@"CurlSegueUnwind" sender:self];

}


When I build and run the App, every time I tap on the button that has "dismissMe" attached to it, the App crashes. Oddly, I don't even get the NSLog in my Xcode console before/when it crashes.


Can anyone perhaps point out where I may have gone wrong?

App crashes when trying to perform custom segue
 
 
Q