How to take several images from Camera ios
Asked Answered
E

1

6

I`m making one implementation for take photo from camera and select photo from library.

For take photos from library i`m using ELCImagePickerController and setting the images in a scrollview.

What i want to do is take several images from Camera and setting this on the same scroll view.

Current my implementation is:

- (IBAction)takePhoto:(UIButton *)sender {

        UIImagePickerController *cameraPicker = [[UIImagePickerController alloc] init];
        cameraPicker.delegate = self;
        cameraPicker.allowsEditing = YES;
        cameraPicker.sourceType = UIImagePickerControllerSourceTypeCamera;

        [self presentViewController:cameraPicker animated:YES completion:NULL];
}

- (void)imagePickerController:(UIImagePickerController *)photoPicker didFinishPickingMediaWithInfo:(NSDictionary *)info {

        [photoPicker dismissViewControllerAnimated:YES completion:NULL];
        UIImage *image=[info objectForKey:UIImagePickerControllerEditedImage];
        UIImageView *imageview = [[UIImageView alloc] initWithImage:image];
        [imageview setContentMode:UIViewContentModeScaleAspectFit];

        [self.scrollView addSubview:imageview];
        [self dismissModalViewControllerAnimated:YES];
}

With this i just can take one photo per time and when i set this again it replace the other one. How can i take serveral? and how i supose do that?

Elstan answered 6/1, 2016 at 12:2 Comment(2)
Have some faith in google, make some research. This is already done so many times... Check cocoacontrols.com for some free of charge candies. Also, this can be implemented very easily using AssetsLibrary framework of iOS.Mcvey
Thank you @FahriAzimov i found what i was looking for on cocoacontrols.comElstan
E
4

First,I want say Thanks to Fahri Azimov, him comment on my Question but he dont asnwer it. I found the solution on CocoaControls .

There I found one Application doing what I was looking for.

RPMultipleImagePicker

What I had to do Add the controllers,models and resources from RPMultipleImagePicker. Import it on my Controller. Then change some things in Image Picker for add in my on ScrollView.

Elstan answered 6/1, 2016 at 19:27 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.