title: UPdate UIProgressView within for loop
body: <p>I've already searched for the problem, and the only hint was the performSelectorOnMainThread solution. I did that, but the view is not updating while the for loop is running. After the loop the progress value is displayed correctly – but that's not the point of an "Progress" View =)</p>
  
  <p>The for loop is within a controller. I call a method to set the progress value:</p>
  
  <pre><code>CGFloat pr = 0.5; // this value is calculated
  [self performSelectorOnMainThread:@selector(loadingProgress:) withObject:[NSNumber numberWithFloat:pr] waitUntilDone:NO];
  </code></pre>
  
  <p>And this is the loading progress method</p>
  
  <pre><code>-(void)loadingProgress:(NSNumber *)nProgress{
      NSLog(@"Set Progress to: %@", nProgress);
      [[self progress] setProgress:[nProgress floatValue]];
  }
  </code></pre>
  
  <p>I also tried to put the method with the for loop into a background thread by using this at the top of the method:</p>
  
  <pre><code>    if([NSThread isMainThread]) {
          [self performSelectorInBackground:@selector(importData) withObject:nil];
          return;
      }
      NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];  
  </code></pre>
  
  <p>Maybe somebody can help me with this.</p>