gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-11-29 10:56:16 24 4
gpt4 key购买 nike

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

-(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/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com