I've been googling this for days, and I'm pulling my hair out trying to get this to work. In my app, the very first view that loads is a view that has a login and signup button. Pressing the login button calls
- (IBAction)login:(UIButton *)sender {
LoginViewController *loginView = [[LoginViewController alloc] initWithNibName:@"LoginView" bundle:nil];
[self presentModalViewController:loginView animated:YES];
[loginView release];
}
Which presents a login form. After the user logs in, I would like to dismiss the modal view (which I already have implemented) and then replace the view with the login and signup buttons with an entirely new view/view controller and have that be the root controller for UINavigationController. And go on from there.
How can I implement this? Thanks!
EDIT: I ended up starting off with a tab bar-based app with a navigation controller for each tab (which solved my other problems) and dealing with the login part after I work on the main part of the app. Upon launch, I'm going to check if the user is logged in and if not, present the login view modally but with no animation.