0x8badf00d
0x8badf00d

Reputation: 6401

Splash Screen in iOS Multitasking

In what cases would iOS application would shows splash screen i.e., Default image (other than App Launch) ?

I am forcing a view controller to support landscape mode only

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 
{ 
     return (interfaceOrientation == UIInterfaceOrientationLandscapeRight || interfaceOrientation == UIInterfaceOrientationLandscapeLeft); 
}

If user is in this view and pushes the application to background and then bring it back up, app shows splash screen for < 1 second..

In another case if I have an UIAlertView open, push the application to background and bring it back up, app shows splash screen for a second.

Do we have any explanation about this in UIKit Documentation, and in what scenarios would multitasking in iOS will show user the Splash screen for a brief period.

Thanks.

Updated Question with an example:

If we go to Settings Application (for the first time) -> iTunes &App Stores -> Tap on AppleId: row -> You will be presented with an alertView -> Push Home button which takes the app to background -> bring the app back up. You will observe Default.png for Settings application for < 1 second before you will be presented with screen you were on before.

Upvotes: 2

Views: 1141

Answers (2)

0xced
0xced

Reputation: 26518

The system (SpringBoard) is responsible for managing your app snapshots. When you leave your app, a snapshot is written as a png file inside Library/Caches/Snapshots/com.yourcompany.yourapp/[email protected]

When you relaunch your app, SpringBoard tries to read that file and display it so that you have the impression that your app has woke up very fast. If it can not read that snapshot file, then it will display the Default.png instead.

I have noticed that Default.png is displayed only when you quit and relaunch your app very quickly. If you wait one or two seconds before relaunching your app, the system has time to write the snapshot and the Default.png is not displayed.

Since a system process is managing the display of snapshots, there is absolutely nothing you can do in your app to prevent Default.png to briefly appear.

Upvotes: 9

calimarkus
calimarkus

Reputation: 9977

The Default.png will only be displayed, if the app gets started from scratch. This means the first time, or it was closed completetly since it was opened the last time.

If you just run a standard app, you will see the Default.png at the first start only until it gets closed from the system (because of too less memory) or from the user via the multitasking bar.

Upvotes: 1

Related Questions