title: View not updating, but everything on the main thread
body: <p>I'm trying to show a UIProgressView on top of a table view after certain user interactions.  In my table view, if the user taps one particular cell, I slide up a UIView that contains a toolbar with bar items and a picker view (it very much behaves like an action sheet).  When I do this, I'm adding the view offscreen to the current view, and then animating the slide-in.  When the user makes a selection and taps "done", the view slides back out.  At that point, the progress view is supposed to appear and update as some things are happening in the background.</p>
  
  <p>The problem I'm having is that after the "alert sheet" UIView is slided out of the current view, nothing happens in the UI for a good while.   When I show the sliding view, I do this:</p>
  
  <pre><code>[[[UIApplication sharedApploication] keyWindow] addSubview:slidingView];
  CGRect newFrame = CGRectMake(...);
  [UIView animateWithDuration:0.3
      animations:^{
          slidingView.frame = newFrame;
      }];
  </code></pre>
  
  <p>When the user taps the 'done' button in the sliding view, this action method is invoked:</p>
  
  <pre><code>- (void) done {
      NSNumber *row = GetSelectedRowSomehow();
  
      [self dismiss:@selector(doneCallback:) withObject:row];
  }
  
  - (void) dismiss:(SEL)cb withObject:(id)obj {
      [UIView animateWithDuration:0.3
          animations:^{
              slidingView.frame = CGRectMake(...);
          }
          completion:^(BOOL finished) {
              [self.delegate performSelectorOnMainThread:cb
                                              withObject:obj
                                           waitUntilDone:NO];
              [slidingView performSelectorOnMainThread:@selector(removeFromSuperview:)
                                            withObject:nil
                                         waitUntilDone:NO];
          }];
  }
  </code></pre>
  
  <p>The callback that gets called here:</p>
  
  <pre><code>- (void) doneCallback {
      self.dialogView.hidden = NO;
      self.progressView.progress = 0;
  
      for (float i = 0; i &lt; 1.0; i += 0.1) {
          self.progressView.progress += i;
          sleep(0.5);
      }
  }
  </code></pre>
  
  <p>In my case, <code>dialogView</code> doesn't appear until after <code>callback</code> has completed.  Why wouldn't it just update the display immediately after its <code>hidden</code> property was set to <code>NO</code>?</p>