Im doing a TabBarApplication, and a login screen presented with ModalViewController.
In the Login screen is the new registration button, that leads me to choose the account type and then leads me to fill a form with personal information.
I have also back buttons in Account type screen and in the Personal Information form.
Its like this:
A – Login Screen.
B – Account type.
C – Personal info form.
User goes this way: A->B->C
If the user press back at account type (B), I’m just dismissing it and done.
If the user press back at Personal info (C), I dismiss C and B view appears.
But the problem is that, if the user is successfully registered. I need to dismiss C and B at same time and go to A (login screen) and I can’t do it.
Since B is parent to C, I just can’t dismiss them both.
This way I call the new views:
ScreenUpdateAccountOuter *registerscreen = [[ScreenUpdateAccountOuter alloc] initWithNibName:nil bundle:nil];
[self presentModalViewController:registerscreen animated:YES];
And this way I dismiss them:
[self.parentViewController dismissModalViewControllerAnimated:YES];
Appreciated some help.
Thank you.
You need to use delegate methods.
I hope you have heard about Protocols and Delegates in iOS. To know more about that, see here
Download this application and see how I have implemented.