My app is loading an online plist on launch, which is needed to display the data in the tableview which will be shown. Depending on the internet connection, loading the plist can take rather long (4-5 seconds) and the launch screen is shown this entire time. Now, I’d like to put an activity indicator in the status bar (while launch screen is still up) so that the user knows the app is busy loading.
I’m loading the plist and creating arrays etc. in ViewDidLoad, and I’m not sure on how to achieve what I’ve sketched above.
Do you have any thoughts on this matter? Thanks.
I would reconsider your approach if I were you. Unless you’ve specifically put in measures to avoid it, it’s likely that your code to download the plist will be being called before
applicationDidFinishLaunching:returns. This is not good because if it takes a long time then the watchdog might kill your app even before it’s actually properly launched. Not a good thing.You should really be kicking off the download in a background thread and just stick a spinner in your actual view. So something like this: