title: HUD Showing while performing segue
body: <p>I am using the master-detail example on my app.</p>
  
  <p>And I added the <a href="https://github.com/jdg/MBProgressHUD" rel="nofollow">MBProgressHUD</a> to show a loading screen while the detail get loaded.</p>
  
  <p>The thing is that I dont know what am I doing wrong with the threads but I have ended up with 2 ways of doing it:</p>
  
  <p>1 - If I do not throw the dispatch_async(), the HUD is showed with delay;</p>
  
  <p>2 - If I perform the segue inside the dispatch_async(), it takes more time than necessary to load stuff.</p>
  
  <p>Heres da code for example 1:</p>
  
  <pre><code>- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
      [HUD show:YES];
      [self performSegueWithIdentifier:@"detail" sender:nil];
      [tableView deselectRowAtIndexPath:indexPath animated:YES];
  }
  </code></pre>
  
  <p>Heres da code for example 2:</p>
  
  <pre><code>- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
      [HUD show:YES];
      dispatch_queue_t taskQ = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0);
      dispatch_async(taskQ, ^{
          [self performSegueWithIdentifier:@"detail" sender:nil];
          [tableView deselectRowAtIndexPath:indexPath animated:YES];
      });
  }
  </code></pre>
  
  <p>Any leads?</p>