title: iOS - showing an overlay over UITableView
body: <p>I'm downloading data from the web that is then showed on a <code>UITableView</code>. Because I want a responsive UI I'm using background downloading with <code>GCD</code>. So while the data is downloading there is an empty UITableView displaying (which is not so pretty). And over that there is a <code>UIActivtyIndicatorView</code> (setup in IB) spinning.</p>
  
  <p>What I would like is to instead of showing a empty table to display a gray screen with the UIActivityIndicatorView over it.</p>
  
  <p>The code I have so far is this:</p>
  
  <pre><code>dispatch_async(dispatch_get_global_queue(0, 0), ^{
  
      NSArray *downloadedCareerIds = [CareersParser idsFrom:@"web"];
      NSArray *diskCareerIds = [CareersParser idsFrom:@"disk"];
  
      BOOL equalIds = [downloadedCareerIds isEqualToArray:diskCareerIds];
  
      if (!equalIds) {
  
          DLog(@"ids not equal");
  
          dispatch_async(dispatch_get_main_queue(), ^{
              /* Send UI updates back to the main thread. */
  
              // I think here would be a good idead to insert the gray view over the table
  
              [loadingIndicator startAnimating];
              // Do GUI stuff on the main thread ...
              [loadingIndicator stopAnimating];
              // Remove the gray view?
  
          });
      }
  });
  </code></pre>