title: Objective c save image to gallery
body: <p>I manipulated some pixels in image and now when i open the image in app, a message appears but problem is that i saved it to my document directory. I want to allow someone to share this photo. If i save the image below, the image data changes. </p>
  
  <pre><code>UIImageWriteToSavedPhotosAlbum(image, nil, nil, nil);
  </code></pre>
  
  <p>If i save the image to app documents, i can't pick it with imagepicker.</p>
  
  <pre><code>NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
  NSString *documentsDirectory = [paths objectAtIndex:0];
  NSString *imagePath =[documentsDirectory stringByAppendingPathComponent:[NSString stringWithFormat:@"%@.png",self.imageName.text]];
  [UIImagePNGRepresentation(image) writeToFile:imagePath
                                                       atomically:YES];
  </code></pre>
  
  <p>So my question is that can i save image to gallery with a custom name or can i save image to gallery with path ?</p>