我对XCode比较陌生,我不明白如何让用户从UIImagePickerControler中选择多个图像。这是我当前的代码,允许用户选择一个图像:
UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init];
imagePicker.delegate = self;
[self presentModalViewController:imagePicker animated:YES];
[imagePicker release];
然后,为了处理选择的图像,我使用:
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
[self dismissModalViewControllerAnimated:YES];
UIImage *image = [info valueForKey:UIImagePickerControllerOriginalImage];
//do stuff with image
}
如何修改代码的两个部分以允许用户选择多个图像。提前谢谢。
Guvvy
答案 0 :(得分:2)
查看Asset Library APIs。它们允许您执行ImagePicker内部执行的操作。然后,您可以添加自己的逻辑(即多选)。 Here's a nice tutorial for that.
答案 1 :(得分:1)
UIImagePickerController没有用于多个图像拾取的API - 但这可能会给你一个开始: http://www.iphonedevsdk.com/forum/iphone-sdk-development/55351-uiimagepickercontroller-multi-select-photos.html
答案 2 :(得分:0)
不幸的是,您必须构建自定义界面才能使其正常工作。