Hello I am new to IOS and I have difficulty with some issues. I am using SWRevealViewController and I need to log in and logout from it.
I switch between login screen and main screen in AppDelegate
BOOL isLoggedIn = [[NSUserDefaults standardUserDefaults] objectForKey:@"islogin"];
NSString *storyboardId = isLoggedIn ? @"login_screen" : @"main_screen";
self.window.rootViewController = [self.window.rootViewController.storyboard instantiateViewControllerWithIdentifier:storyboardId];
In Login view controller (I have uses show details Segue)
[self performSegueWithIdentifier:@"login" sender:self];
In Right Reveal Menu with logout TableViewCell selected (also with show detail segue)
[self performSegueWithIdentifier:@"logout" sender:self];
My question that if the user login and logout multiple times will ViewControllers go to back stack and allocate memory.
I have used show detail segue since I thought it will replace the previous view controller and what about front view controller?
Am I in the right way? please help