PDA

View Full Version : Introduction View Shows for few seconds before the application opens up..?




jjgraz
Apr 27, 2009, 04:00 PM
How does one go about having a view, which upon startup, shows for a few seconds before putting the user into the application. We want to do a quick animation right before the app starts....Perhaps while info is being loaded on application the screen is showing the animation? should be in didFinishLaunching?....Is there a way to tie the loading process to the amount of time this first view is displayed, or can we set a time limit for display of this first view?

Thank you.



Niiro13
Apr 27, 2009, 05:35 PM
I'm never sure about the best method to do things, but I'd say that applicationDidFinishLaunching you'd display the view, then create a timer when the view is displayed. After the specified number of seconds you set for the timer, remove the view.

You can also do loading during this time by creating a separate thread. (NSThread). I do not know how to measure the time it will take for the thread to finish (until after it's finished which can vary depending on if someone's phone starts getting laggy or if it's a fresh start).

dejo
Apr 27, 2009, 05:57 PM
I do not know how to measure the time it will take for the thread to finish (until after it's finished which can vary depending on if someone's phone starts getting laggy or if it's a fresh start).
Instead of guessing an amount of time for NSTimer, the best approach to use for this kind of solution is to send a notification. Google NSNotification and NSNotificationCenter for more info.

jjgraz
Apr 27, 2009, 06:06 PM
Thank you both. I will look into Notifiaction.