I searched through stackOverflow but could not find the answer for my problem. So, I decide to ask a seemingly old question.
My example (xcode 5) has 2 views: one is a login button view (login) and the other is an empty destination view (dest).
In dest.m, I put below @implementation:
@implementation testViewController
- (IBAction)unwindToTest:(UIStoryboardSegue*) segue
{
NSLog(@"Segue unwindToTest works");
}
I ctrl-drag the login button to Exit in storyboard and select unwindToTest. I also write prepareForSegue in login.m:
@implementation loginViewController
- (void) prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
NSLog(@"Prepare for Segue to unwind to Plan List");
}
I main.m, I aslo put:
NSLog(@"Starting from main");
to keep track of the flow.
Building returns success. The login view appears, but when I click login button, nothing happens. I check the log, it only shows "Starting from main".
Really appreciate your comments. Huynh.