This is my Hierarchy
Navigation Controller --> Login Controller View --- > Register Controller View
--> My Small Internal LeaderBoard View
Now I am using segues (Push) to go to either LoginControllerView or LeaderBoardView
Once I am on LoginControllerView and then RegisterControllerView I am using this code
[self dismissViewControllerAnimated:YES completion:nil]
However instead of returning me to LoginControllerView it is returning me back to NavigationController.
How can I return to my LoginController
I am transitioning from Login to Register through PUSH segue and I have named the segue as “Register”
From Login To RegisterController I am using this code
[self PerformSegueWithIdentifier:@"Register" sender:Self]
However, I can see from RegisterView connection inspector that its viewController reference StoryBoard Segue is “Login” .. I am transitioning from Login to Register with Register Segue, How can my RegisterController has Login segue as reference?
You did not say how
RegisterControllerViewis being presented. If it is being pushed on the navigation controller stack, then why not call:If you are doing something special, then you need to say what special thing you are doing.
Also, note that if you find where a view controller is trying to dismiss itself, then you should at minimum revisit your design to see if that’s really the best thing to do. A view controller may not know how it was presented, so it may not know the best way to dismiss itself either.