如何从Camera ios拍摄多张图像

Ped*_*nco 6 camera objective-c ios ios-camera

我正在制作一个实现从相机拍照并从库中选择照片.

使用ELCImagePickerController从库中拍摄照片并在scrollview中设置图像.

我想要做的是从相机拍摄几张图像并在同一滚动视图上设置它.

目前我的实施是:

- (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];
}
Run Code Online (Sandbox Code Playgroud)

有了这个,我每次只能拍一张照片,当我再次设置它时,它会替换另一张照片.我该怎么办?以及我如何做到这一点?

Ped*_*nco 4

首先,我想说感谢 Fahri Azimov,他对我的问题发表了评论,但他没有回答。我在CocoaControls上找到了解决方案。

在那里我发现一个应用程序正在做我正在寻找的事情。

RP多重图像选择器

我必须做什么 从 RPMultipleImagePicker 添加控制器、模型和资源。将其导入我的控制器上。然后更改图像选择器中的一些内容以添加到我的 ScrollView 中。