title: ActivityIndicator doesn't stop after computations
body: <p>I'm trying to make activity indicator while uploading files, so i've found a lot of solutions, but i guess i don't fully understand them, so my code look like this:</p>
  
  <pre><code>- (void) startSpinner {
  
  UIActivityIndicatorView  *spinner = [[UIActivityIndicatorView alloc]initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray];
  [spinner setCenter:CGPointMake(self.view.frame.size.width/2.0, self.view.frame.size.height/2.0)];
  [self.view addSubview:spinner];
  [spinner startAnimating];
  
  }
  
  
  - (void)startSync {
  
  [NSThread detachNewThreadSelector:@selector(startSpinner) toTarget:self withObject:nil];
  
  // computations 
  
  [self.spinner stopAnimating];
  } 
  </code></pre>
  
  <p>So after i do [self startSync] activityIndicator appears, but after uploading it didn't stop. Also if i declare activity indicator somewhere else (not in the (void)startSpinner), for example in viewDidLoad, and only do [self startAnimating] it didn't appear at all. Please help me find out errors.</p>