Monday 15 April 2013

uiview - How to update the display while still in a function (iOS with MonoTouch/Xamarin) -


I have a process that asks information and I want to display it on screen because it is received in my UIViewController Happening. What I want to do is to use an overlay like this

and update loadingLabel.Text with the UIViewController. However, adding this view does not seem to work immediately - I guess the function call is required to exit before the graphics update. I

This type of overlay is displayed to me What is the mechanism to allow, and when I process the data, do it "run"? Do I need to move the call to a different thread and update the performance through delegate tasks?

Again reading and Jason's comment you probably want to do something like:

  work.finter Process deep things for start new ((=) => {// Do {Int i = 0; i & lt; 999999999; i ++} {System.Threading.Thread.Sleep (1000); this. InvokeOnMainThread ((=) = & gt; {this.MyLabel.Text == string.Format ("Count to {0}", i);});}});   

Basically whenever you want to update the UI, you need to do it on the main thread.

No comments:

Post a Comment