Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

jjgraz

macrumors regular
Original poster
Feb 13, 2009
103
0
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

macrumors 68000
Feb 12, 2008
1,719
0
Illinois
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

Moderator emeritus
Sep 2, 2004
15,982
452
The Centennial State
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.