[英]How to select multiple images in Photos Library using ELCImagePickerController and ALAssetsLibrary?
作為iam的新手,請告訴我如何在照片庫中選擇多個圖像。 從一個星期開始,我一直在尋找解決方案,但是沒有找到與我的代碼相關的解決方案。 根據我的代碼,我可以一次選擇一張圖像。 到目前為止,這是我的代碼的樣子:
-(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相比,我可以為您提供更好的庫。 它已在多個應用程序中使用,並且可自定義得多。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.