Question

I have a login UIViewController that handles authentication.

If a user exists, I push a main view to the UI.

This works fine, but it first shows the login window for a second before doing the slide animation. I would like the main view to show only if the user exists so it doesn't look like it is unnecessarily sliding past the login view controller.

I do the push with the following:

MainViewController *mvc = [self.storyboard instantiateViewControllerWithIdentifier:@"main"];
 [self.navigationController pushViewController:mvc animated:YES];

How can I skip straight to the main view controller?

Was it helpful?

Solution

Setting the animated Boolean to NO will show the view controller immediately.

OTHER TIPS

Change animated parameter to NO: animated:NO

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top