-2

I've using uiimagepickercontroller and taken images via camera and stored into folder that was created in sandbox. That stored images are not displayed in iPads or iPhone photo gallery. I want to display those sandbox pictures in device gallery. Any one help me out from this. My optimum goal is to copy image from sandbox and paste it to device's internal memory.

Eric Aya
  • 69,473
  • 35
  • 181
  • 253
vignesh.P
  • 41
  • 9

1 Answers1

1

You use the UIImageWriteToSavedPhotosAlbum() function.

UIImageWriteToSavedPhotosAlbum(IMAGE_TO_STORED, nil, nil, nil);

Edit:

- (IBAction)savedPhoto:(id)sender{
    UIImageWriteToSavedPhotosAlbum(IMAGE_TO_STORED, nil, nil, nil);
}

Another way to stored image is:

ALAssetsLibrary *library = [[ALAssetsLibrary alloc] init];
[library saveImage:image toAlbum:nil withCompletionBlock:^(NSError *error) {
        if (error!=nil)
        {
            NSLog(@"Error: %@", [error description]);
        }
    }];
Nirmalsinh Rathod
  • 5,079
  • 4
  • 26
  • 56