title: iOS - UIImageWriteToSavedPhotosAlbum
body: <p>I wanted to use the following void API to write a captured image to the photo album but I am not very clear about 2 of the parameters</p>
  
  <pre><code>UIImageWriteToSavedPhotosAlbum (
     UIImage  *image,
     id       completionTarget,
     SEL      completionSelector,
     void     *contextInfo
  );
  </code></pre>
  
  <p>From the explanation from ADC:</p>
  
  <p><code>completionTarget:</code> optional; the object whose selector should be called after the image has been written to the Camera Roll album.</p>
  
  <p><code>completionSelector:</code> the method selector of the completionTarget object. This optional method should conform to the following signature:</p>
  
  <pre><code>- (void)image:(UIImage *)image didFinishSavingWithError:(NSError *)error contextInfo: (void *) contextInfo;
  </code></pre>
  
  <p>What is the significance of <code>completionTarget</code> here? Can someone explain with an example how this parameter should be used? Or any resource which can guide me through it.</p>