title: Terminate Async Call
body: <p>I have the following code, where <code>async</code> operation executes. The following code works, but my question is how to cancel/terminate <code>async</code> operation?</p>
  
  <p>In other words, while app is working in the background by calling <code>[self addAllImages]</code> and then user navigates to other view, and I should terminate this <code>async</code> call.</p>
  
  <pre><code>dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0), ^(void) {
        [self addAllImages];
        dispatch_sync(dispatch_get_main_queue(), ^(void) {
              [self pageControlSetUp];
              self.fullScreenImageView.hidden = YES;
          });
  });
  </code></pre>