How can I get an indication to main UI thread in an iPhone app IOS program, when background task has completed?
Background
- I'm trying to setup a loading indicator per the concept at How to add a UIActivityIndicator to a splash screen in a iphone application?
- was going to in AppDelete use "performSelectorInBackground" to load up the model data
- what I need therefore is in the RootViewController some way of telling when the data has finished loading in the background so that it can (a) update the tableview with the data and (b) remove any activity indicator
- I'm assuming way to do things here is as followings:
- in App Delegate didFinishLaunchingWithOptions pass off Model data loading to background
- AppDelegate loads up RootViewController and it immediately setup up an activity indicator
- once data is loaded in background, it somehow has to indicate this back to the RootViewController (? reason for this question) that it's finished
- 2nd question is probably also when background task does inidicate its finished, how can the RootviewController check that the UI did get setup (with activity indicator etc) before it tries to disable the activity indicator