Ole is pretty much true, but there is a trick that you don't mind synchronous processing (often because you want to display an activity indicator in the first place).
First, move your code that you want to process, while the counter works according to its own method. Then do
[spinner startAnimating]
[self performSelector:@selector(methodname) withObject:nil afterDelay:0]
AfterDelay: 0 means next time through a run loop. Thus, the rotation begins.
source
share