iPhone UIActivityIndicatorView not starting or stopping -


When I start a call, on a UIActivityIndicatorView, it does not start. Why is it like this?

[This is a blog-style self answer. The solution given below works for me, but, maybe others are better?]

If you type in code like this:

  - (zero) dustfam {[activity indicator start-up]; ... lots of computations ... [activity indicator stop animation]; }  

You do not really have UI timings to start and stop the activity pointer because all of your calculations are on the main thread. Call to start a solution: To translate into a different thread:

  - (zero) ThreadStartEnimation: (ID) data {[Activity indicator startAnumitting]; } - (zero) dustf {{NSThread detachNewThreadSelector: @selector (thread start animating :) to toggle: self with object: zero]; ... lots of computations ... [activity indicator stop animation]; }  

Or, you can put your calculation on a separate thread, and wait for it to stop before calling StopAnimation.


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

php - jQuery AJAX Post not working -