title: iPhone - GCD doesn't work for the first time
body: <p>In my app, I load image from the URL:</p>
  
  <pre><code>-(void)loadImages
  {
      ...
  
      image1 = [UIImage imageWithData:[NSData dataWithContentsOfURL:imgUrl1]];
  }
  </code></pre>
  
  <p>In order to avoid blocking the main thread until the download has completed I call this method in 
  <strong>-viewDidAppear</strong> using <code>GCD</code>:</p>
  
  <pre><code>dispatch_async( dispatch_get_global_queue(0,0), ^{
              [self loadImages];
          });
  </code></pre>
  
  <p>However, when I open my <code>view controller</code> with the <code>imageView</code> at the first time, the <code>imageView</code> is empty (even if I wait for a long time) but after I open this <code>view controller</code> again and image appears and everything is good to go.</p>
  
  <p>Where is my mistake ?
  Sorry, new to multithreading :)</p>
  
  <p><strong>EDIT</strong>:
  I also forgot to mention, that I use the image in the <code>tableView</code> when I get it:</p>
  
  <pre><code> cell.imageView.image = image1;
  </code></pre>