title: Save image to camera roll with UIImageWriteToSavedPhotosAlbum
body: <p>I am trying to save a photo with a button to camera roll after user capture a picture with Camera , but  I don't know why my picture doesn't save at photo library !! </p>
  
  <p>Here is my code :</p>
  
  <pre><code>-(IBAction)savePhoto{
  
      UIImageWriteToSavedPhotosAlbum(img.image,nil, nil, nil);
  
  }
  
  -(IBAction)takePic {
  
      ipc = [[UIImagePickerController alloc]init];
      ipc.delegate = self;
      ipc.sourceType = UIImagePickerControllerSourceTypeCamera; 
      [self presentModalViewController:ipc animated:YES];
  
  }
  
  - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
  
      img.image = [[info objectForKey:UIImagePickerControllerOriginalImage]retain];
      [[picker parentViewController]dismissModalViewControllerAnimated:YES];
      [picker release];   
  }
  </code></pre>
  
  <p>Variable name <code>ipc</code> is <code>UIImagePickerController</code> and <code>img</code> is <code>UIIMageView</code>.</p>
  
  <p>what's my problem ?</p>