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?

有帮助吗?

解决方案

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

其他提示

Change animated parameter to NO: animated:NO

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top