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?

Pedro Franco
  • 1,926
  • 1
  • 15
  • 37
  • 3
    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. – Fahri Azimov Jan 06 '16 at 12:11
  • Thank you @FahriAzimov i found what i was looking for on cocoacontrols.com – Pedro Franco Jan 06 '16 at 13:18

1 Answers1

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.

Pedro Franco
  • 1,926
  • 1
  • 15
  • 37