我对 XCode 比较陌生,我不明白如何允许用户从 UIImagePickerControler 中选择多个图像。这是我当前允许用户选择一张图片的代码:
UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init];
imagePicker.delegate = self;
[self presentModalViewController:imagePicker animated:YES];
[imagePicker release];
然后,为了处理选择的图像,我使用:
- (void)imagePickerControllerUIImagePickerController *)picker didFinishPickingMediaWithInfoNSDictionary *)info {
[self dismissModalViewControllerAnimated:YES];
UIImage *image = [info valueForKey:UIImagePickerControllerOriginalImage];
//do stuff with image
}
如何修改代码的两个部分以允许用户选择多个图像。提前致谢。
古维
查看 Asset Library APIs .他们让你做 ImagePicker 在内部做的事情。然后,您可以在此基础上添加您自己的逻辑(即多选)。 Here's a nice tutorial for that.
关于iphone - 如何处理来自 UIImagePickerController 的多个图像?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7867872/
欢迎光临 OStack程序员社区-中国程序员成长平台 (https://ostack.cn/) | Powered by Discuz! X3.4 |