[英]How to select multiple images in Photos Library using ELCImagePickerController and ALAssetsLibrary?
As iam a newbie please tell me how to select multiple images in the photos library. 作为iam的新手,请告诉我如何在照片库中选择多个图像。 I have been searching the solution since a week, but not finding a relevant one for my code.
从一个星期开始,我一直在寻找解决方案,但是没有找到与我的代码相关的解决方案。 As per my code, iam able to select one image at a time.
根据我的代码,我可以一次选择一张图像。 This is how my code looks as of now:
到目前为止,这是我的代码的样子:
-(IBAction) photosClick
{
ipc= [[UIImagePickerController alloc] init];
ipc.delegate= self;
ipc.sourceType= UIImagePickerControllerSourceTypePhotoLibrary;
[self presentModalViewController: ipc animated:YES];
}
-(void) imagepickerControllerDidCancel: (UIImagePickerController *)picker
{
[[picker parentViewController] dismissViewControllerAnimated:YES completion: nil];
[picker release];
}
-(void) imagePickerController: (UIImagePickerController *)picker didFinishPickingMediaWithInfo: (NSDictionary *)info
{
UIImage *image;
NSURL *mediaURL;
mediaURL= (NSURL *)[info valueForKey: UIImagePickerControllerReferenceURL];
NSString *imagePath= [[NSString alloc] init];
imagePath= [mediaURL absoluteString];
NSLog(@"path of the image is: %@", imagePath);
image= (UIImage *) [info valueForKey: UIImagePickerControllerOriginalImage];
imageView.image= image;
[picker dismissModalViewControllerAnimated:YES];
[picker release];
}
-(void) imagePickerControllerDidCancel: (UIImagePickerController *)picker
{
[picker dismissModalViewControllerAnimated:YES];
}
Please help me with this problem by editing my code so that i can understand well. 请通过编辑代码来帮助我解决此问题,以便我能很好地理解。 I have been stuck with this and not getting any solution.
我一直坚持下去,没有得到任何解决方案。
I can offer you a better library than the ELC Image Picker Controller. 与ELC Image Picker Controller相比,我可以为您提供更好的库。 This has been used in multiple apps and is far more customizable.
它已在多个应用程序中使用,并且可自定义得多。
Please check QBImagePickerController 请检查QBImagePickerController
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.