I have a large application. It has a lot of tables and navigation between them. I started a project as a 'NavigationBasedProject' (xcode template). But now I need to add login at the start of the application. So here what I did so far: In 'didFinishLaunchingWithOptions' I added:
loginViewController = [[LoginViewController alloc]init];
[loginViewController.view setFrame:CGRectMake(0, 0, 320, 480)];
[self.window.rootViewController presentModalViewController:loginViewController animated:NO];
When user data are valid I dismiss login screen like this:
[self.loginViewController dismissModalViewControllerAnimated:YES];
User can also logout from application. And then I present login screen again like this:
[self.window.rootViewController presentModalViewController:loginViewController animated:NO];
And this works. But text fields on login screen are still filled with data that user enter to login. And I am afraid that I have some memory issue here. How to remove login screen completely from memory when user logs in. I don't use GUI designer I connect everything from code. Also I wonder is it good idea to make login screen and modal view?