I am new to iOS programming, and I'm trying to do something very basic. I want the first screen in the app to be different for logged in users, and not logged in users. I am currently using the following code in my main ViewController
:
if (token == nil) {
// don't do anything
} else {
// logged in, so show the second page
UIViewController *loggedIn = [self.storyboard instantiateViewControllerWithIdentifier:@"LoggedInViewController"];
[self.navigationController pushViewController:loggedIn animated:NO];
}
This works, but I'm wondering if I'm following proper iOS programming conventions. Is there another, more "standard" way of doing things?