It's typical during app startup to create your main UI structure, but during if user is not logged in during app launch, to immediately present a modal intro/login screen above the normal UI.
Normally it has been fine to present the modal UI using presentViewController:animated:NO
, because the user would see: App Launch Image -> Login UI.
However, on iOS 8, it seems calling presentViewController
with animated = NO still briefly shows the underlying view controller for a frame before presenting the view controller.
Example:
I don't want to present the login UI first, because when the user logged in I'd be presenting the main UI from the login UI, thus keeping the login UI around in the hierarchy indefinitely.
Is there another way I haven't considered? Could storyboards help me here?
Personally I check for logged in status on application launch, and then either install the login view controller or the main root view controller as the window's root view controller.
When the user logs in or out, the window's root view controller is replaced. This can be animated as well. I find this approach quite clean.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With