문제

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