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

Discussion in 'iPhone/iPad Programming' started by jjgraz, Apr 27, 2009.

  1. macrumors regular


    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.
  2. macrumors 68000

    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).
  3. Moderator


    Staff Member

    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.
  4. macrumors regular


    Thank you both. I will look into Notifiaction.

Share This Page