Setting the animated
Boolean to NO
will show the view controller immediately.
How to have pushViewController show only destination view?
-
30-09-2022 - |
Pregunta
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?
Solución
Otros consejos
Change animated parameter to NO: animated:NO
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow