简体   繁体   中英

Multiple-selection image picker

I need an image picker that supports multiple selections for writing an app, something like Photos.

I have found out some solutions by searching, the problem is, choosing the best one. I thought it's much better to ask some experts.

List of solutions:

  1. Using ALAssetsLibrary . The problem: as far as I read, it reads the user's geolocation and ask for permission, which I don't want.
  2. Using Apple API
  3. Using ELCImagePickerController . The problem: I've read that it crashes when there are more than about 100 photos.
  4. Using AGImagePickerController . The problem: new release (Mar 12, 2012), lack of enough reviews and maybe unknown problems.

Do you agree about these problems? Is there any other solution? Which of the above is the best one to use?

是资产图书馆将为您提供所有地理位置信息

This should work https://stackoverflow.com/a/9558307/1294448

The trick is to NOT dismiss the picker after didFinishPickingImage and writeToFile after each image is selected.

-(void)imagePickerController:(UIImagePickerController *)picker
      didFinishPickingImage : (UIImage *)image
                 editingInfo:(NSDictionary *)editingInfo
{
.
.
.
// Get the data for the image
        NSData* imageData = UIImageJPEGRepresentation(image, 1.0);
.
.
.
// and then we write it out
        [imageData writeToFile:fullPathToFile2 atomically:NO];
}

About the location : Assets Library give you all the Geo location information hence app will get a prompt saying app is trying to access their location. No work around for this yet.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM