title: iOS: dispatch_async and UIImageWriteToSavedPhotosAlbum
body: <p>Just learning how to allocate tasks among threads, or dispatch asynchronously. I understand that any operation that "touches" a view must be done on the main thread. What about: <code>UIImageWriteToSavedPhotosAlbum</code>? <strong>I would assume this could be done on a background thread, but am I mistaken?</strong></p>
  
  <p>Also, if it should be done on a background thread, is there a difference between these two calls below, as one saves a UIImage and the other saves a UIImage from a view?</p>
  
  <pre><code>UIImageWriteToSavedPhotosAlbum(_someUIImage ,nil,nil,nil);
  
  UIImageWriteToSavedPhotosAlbum(_imageView.image ,nil,nil,nil);
  </code></pre>
  
  <p>By the way I am using this setup to run an HUD in the main thread and to tasks in the background, that is my intention.</p>
  
  <pre><code>[HUD_code showMessage:@"saving image"];
  dispatch_queue_t concurrentQueue =
  dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
  dispatch_async(concurrentQueue, ^{
          UIImageWriteToSavedPhotosAlbum(someUIImage ,nil,nil,nil);
              dispatch_async(dispatch_get_main_queue(), ^{
                  [HUD_code dismiss];
           });
  });
  </code></pre>