title: UIRefreshControl on viewDidLoad
body: <p>I'm using the following code to create a UIRefreshControl:</p>
  
  <pre><code>- (void) viewDidLoad
  {
      [super viewDidLoad];
  
      UIRefreshControl *refreshControl = [[UIRefreshControl alloc] init];
      [refreshControl addTarget:self action:@selector(doLoad) forControlEvents:UIControlEventValueChanged];
      self.refreshControl = refreshControl;
  }
  
  - (void) doLoad
  {
      dispatch_async(dispatch_get_global_queue(0, 0), ^{
              // Instead of sleeping, I do a webrequest here.
              [NSThread sleepForTimeInterval: 5];
  
              dispatch_async(dispatch_get_main_queue(), ^{
                  [tableView reloadData];
                  [self.refreshControl endRefreshing];
              });
      });
  }
  </code></pre>
  
  <p>It works great. If I navigate to my view, drag the table, the code runs and the data displays.</p>
  
  <p>However, what I would like to do is have the view in the 'loading' state as soon as it appears (that way the user knows something is going on). I have tried adding the following:</p>
  
  <pre><code>- (void)viewDidAppear:(BOOL)animated
  {
      [super viewDidAppear:animated];
      [self.refreshControl beginRefreshing];
  }
  </code></pre>
  
  <p>But it does not seem to work. When I navigate to the view, it looks like a regular view (refresh control is not visible), plus when I try to pull the refresh control, it never finished loading.</p>
  
  <p>Obviously I'm going about this the wrong way. Any suggestions on how I should handle this?</p>