iPhone equivalent of Application.DoEvents();
- by BahaiResearch.com
iPHone: We use MonoTouch, but Obj-C answers are ok.
My singleton domain object takes a while to get all the data so it runs internally parts of the fetch in a thread.
I need to inform the UI that the domain is done. Currently I do this. Is there a better way? In WinForms I would call Application.DoEvents() instead of Thread Sleep.
PlanDomain domain = PlanDomain.Instance ();
while (domain.IsLoadingData)
{
Thread.Sleep (100); //this is the main UI thread
}
TableView.Hidden = false;
TableView.Source = new TableSource (this);
TableView.ReloadData ();