iphone - 如何使用 ELCImagePickerController 和 ALAssetsLibrary 在照片库中选择多个图像?

标签 iphone ios elcimagepickercontroller

我是新手,请告诉我如何在照片库中选择多张图片。一周以来我一直在搜索解决方案,但没有找到与我的代码相关的解决方案。 根据我的代码,我可以一次选择一张图片。这是我的代码现在的样子:

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

请通过编辑我的代码帮助我解决这个问题,以便我能够很好地理解。我一直坚持这个,没有得到任何解决方案。

最佳答案

我可以为您提供比 ELC Image Picker Controller 更好的库。这已在多个应用程序中使用,并且可定制性更高。

请查看QBImagePickerController

关于iphone - 如何使用 ELCImagePickerController 和 ALAssetsLibrary 在照片库中选择多个图像?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18232183/

相关文章:

iphone - 如何检查我们在 iOS 中的特定应用程序的 GPS 权限是打开还是关闭?

ios - 是否可以在 IOS swift 中从更大的图像中检测到矩形图像?

ios - 调用 Realm().objects 时使用未实现的初始化程序 'init(realm:schema:)'

ios - 我的 View 后面的按钮? iOS

ios - 未调用 ELCImagePickerController 委托(delegate)方法

ios - 支持多选和时刻 View 的 UIImagePickerController 替代品

iphone - 有没有办法将 Maven + 静态库用于 iPhone 依赖项?

ios - 当我在 IOS 中集成 CCAvenue Payment Gate way 时,我收到 Exe_Bad_Access(code=1 address=0X38)

iphone - iPhone 上的同步与异步

ios - 如何显示刚刚选中的照片库中的图像?