As omz points out, most UIKit classes are not thread-safe, and anything involving your UI should happen on the main thread. The correct way to do some arbitrarily-long-running thing on another queue while showing an activity indicator looks like this:
[self showProgressUIOrWhatever];
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
[self doSomeWork];
dispatch_async(dispatch_get_main_queue(), ^{
[self hideProgressUIOrWhatever];
});
});