In my application I am presenting a modal view controller on top of the root view controller on launch and also when resuming from the background to present a loading/summary screen. This is dismissed after a few seconds to reveal the root view controller. The modal is presented via the applicationWillEnterForeground method on the app delegate.
It’s all working fine, but when resuming from the background it’s quite common to see a flash of the lower root view controller before the loading modal is presented again.
I’m struggling to find an obvious way to do this presentation to ensure it safely appears without seeing the view underneath first. Am I missing something blindingly obvious?
The documentation says the following:
This means you should modify the view in
applicationDidEnterBackground:to have it the way you want it to appear in the picture that iOS will take automatically when an App enters the background state.Also keep the following in mind: