Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS app shows last shown view instead of splash screen- but only sometimes

Sometimes when I open my app (either while resuming it after it was dormant for a while or while opening it after it has been 'quit'), the splash screen, which basically just says 'loading,' doesn't show. The app shows what seems to be the last shown view before the app was quit instead of the loading screen. This is bad because it makes it appear that the app has loaded when it has not and it seems like it is unresponsive even though it's just loading. Has anyone experienced anything like this before?

Edit: I am familiar with the iOS behavior which takes a picture on pause and uses it as a resume picture. Yet when the app has been quit (pressed home button, then hit home button twice, tap and hold app icon, then hit the red dash and quit it) and restarted, it doesn't use the splash screen on the next startup and still uses that last shown view. Can I force the app to always use the splash screen?

like image 989
eric.mitchell Avatar asked Mar 04 '12 05:03

eric.mitchell


1 Answers

The cause of the problem was that I was performing a long-ish operation upon applicationWillTerminate:, which delayed the 'true' termination of the app for a short bit (I assume). So, when I re-open the app right after closing it, this operation (writing data to disk) is still going on, so the app hasn't truly been quit. This is what I believe is the issue from what I can deduce.

like image 107
eric.mitchell Avatar answered Nov 15 '22 08:11

eric.mitchell