Swift: visual glitches when presenting a Main and Alternative (login/onboarding) Flow?

Viewed 1009

I've got an App that requires the person to sign in or create an account the first time the App is launched. (Although this is not generally recommended, this is quite a specific use case.)

Furthermore, if they are already signed in, when the App is updated I'd like to show them a screen telling them about new features (as Notes, Photos and Music do in iOS12).

The problem I have is when changing the ‘rootViewController’ of ‘window’ in AppDelegate, the app glitches and I can see the main view controller for a split second, before the onboarding view controller becomes visible.

Is there a way to avoid this? Can this logic be encapsulated in ViewControllers or in the AppDelegate?

Is there a single mechanism that I can use for one or more of these scenarios that does not rely on multiple implementations?

1 Answers
Related