Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to delay Default.png?

How can I delay the app loading to show the splash screen for longer?

like image 501
Moshe Avatar asked Mar 17 '10 02:03

Moshe


2 Answers

You should let the app start as usual then make the first view that appears have the identical image on it as the splash screen. Start a timer and then replace that view with your real application root view after a few seconds.

Deliberately delaying the actual application launch is a big no-no.

like image 192
toholio Avatar answered Oct 08 '22 01:10

toholio


UPDATE: No seriously, DON'T do this!

Or us the C function

sleep(9);

Putting this in applicationDidFinishLaunching: will cause you program to pause for 9 seconds, any other integer may be entered as well.

EDIT: I've learned a lot in the past year. Don't do this. The reason being that the springboard will automatically stop the app launching if it takes too long. That timing is poorly documented so even one second can result in the app failing.

like image 28
Dustin Pfannenstiel Avatar answered Oct 08 '22 00:10

Dustin Pfannenstiel