title: UITableView Activity Indicator the Apple way
body: <p>My problem is pretty common. I want to show some "loading" stuff while the data that will be shown in a table is being downloaded. But all the solutions I've seen this far is either to add some spinners to cells, or put some semi-transparent view over the app.</p>
  
  <p>What I want to active is the thing that apple does in its apps (for example YouTube). Like, the spinning wheel with word "Loading" is shown on the white background, and then the data is shown.</p>
  
  <p>I have also seen some solution with a grouped style, but my table has a plain style so it isn't helping me a lot I think.</p>
  
  <h2>EDIT</h2>
  
  <p>My final code looks like this:</p>
  
  <pre><code>- (void)loadImagesData
  {
      UIView *tableView = self.view;
      self.view = [[LoadingView alloc] initWithFrame:CGRectMake(0, 0, 320, 367)];
      dispatch_queue_t downloadQueue = dispatch_queue_create("flickr downloader", NULL);
      dispatch_async(downloadQueue, ^{
          NSArray *images = [FlickrFetcher photosInPlace:self.place maxResults:MAX_PHOTOS];
          dispatch_async(dispatch_get_main_queue(), ^{
              self.view=tableView;
              self.imagesData = images;
          });
      });
      dispatch_release(downloadQueue);
  }
  </code></pre>
  
  <p>and imageData setter calls <code>reloadData</code> on table view.</p>