Question

[I just posted a similar question, but I'm not sure whether is actually got posted. Editor: please remove if this is a double post.]

The app that I'm writing has quite some code in the appdelegate's "applicationDidFinishLaunching" and a ViewController's "viewDidLoad". All of this code is executed before the user can start doing something with the app. In the mean time, the "default.png" is shown as a splash screen. This can take up to 10 seconds, which is I think unacceptably long. So I want some of the code to be executed, when the actual UI is already visible and accessible to the user. I don't want however that the user him/herself needs to push a refresh/continue button. Could anyone suggest me a way to minimize the startup time, and do this kind of post-poned execution? Thanks is advance, Sjakelien

Was it helpful?

Solution

You can use NSObject's performSelector:withObject:afterDelay: from your applicationDidFinishLaunching to postpone part of your initialization.

OTHER TIPS

Perhaps you can use the viewDidFinishLoad delegate, but I'm not sure if it's still loaded within the "default image time" or afterwards.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top