I have the following scenario : please see the image below :
I have a SideMenuBar (SWRevealViewController) with one of the items in it being "Login" . On clicking "login" , I would use a custom SWRevealViewController segue to go LoginViewController ( subclass UIViewController ). I have a NavigationItem on LoginVC with a "Cancel" button in it. Now I have this VC2 with another button that goes to LoginVC on click. So I am using a modal-Seque to go from VC2 to LoginVC. However , When I click the button in VC2 , I am able to go to LoginVC but the NavgationItem is missing.
Say if I use a SWRevealViewControoler segue even from VC2->LoginVC , I can see the NavigationItem with cancel button. But, I feel it is an incorrect usage.
Question-1:
Which segue may I use for transition from VC2->LoginVC and why do I have the navigationitem misssing when I use a modal-Segue?
Question-2: (with SWrevealviewControllerSegue from VC2->LoginVC)
If the cancel is clicked on LoginVC , I have to come back to VC2 for which I use the following code :
UIViewController *nextViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"segueIdentifier"];
[self presentViewController:nextViewController animated:YES completion:nil];
This takes me back to VC2 but the Navigationitem of VC2 ( which is a back button ) is missing.
Please me let me know your thoughts . Thanks :)