[英]How to take several images from Camera ios
我正在做一个实现,可以从相机拍摄照片并从图库中选择照片。
要使用ELCImagePickerController从库i`m 拍照并在滚动视图中设置图像。
我要做的是从相机拍摄几张图像,并将其设置在同一滚动视图上。
当前我的实现是:
- (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];
}
有了这个,我每次只能拍摄一张照片,而当我再次设置它时,它将替换另一张照片。 我该如何服用Serveral? 我该怎么做呢?
首先,我要说感谢法赫里·阿齐莫夫(Fahri Azimov),他对我的问题发表了评论,但他没有回答。 我在CocoaControls上找到了解决方案。
在那里,我发现一个应用程序正在执行我想要的操作。
我必须做什么从RPMultipleImagePicker添加控制器,模型和资源。 将其导入我的控制器。 然后在Image Picker中更改一些内容以添加到ScrollView中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.