如何从相机拍几张照片ios

问题描述:

我正在制作一个实现从相机拍摄照片并从库中选择照片。如何从相机拍几张照片ios

用于使用ELCImagePickerController从库中拍摄照片,并在滚动视图中设置图像。

我想要做的是从相机拍摄几张照片并将其设置在相同的滚动视图中。

目前我的实现是:

- (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]; 
} 

有了这个,我只是可以采取每次一张照片,当我设置它再次更换另一个。 我该如何服用?以及我如何做这件事?

+3

对谷歌有一定的信心,做一些研究。这已经完成了很多次...检查cocoacontrols.com一些免费的糖果。而且,这可以使用iOS的AssetsLibrary框架轻松实现。 –

+0

谢谢@FahriAzimov我发现了我在cocoacontrols.com上寻找的东西 –

首先,我要说感谢Fahri Azimov,他对我的问题发表了评论,但他并不认同。 我在CocoaControls上找到了解决方案。

在那里,我发现一个应用程序正在做我正在寻找的东西。

RPMultipleImagePicker

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