如何从照片库中选择多个图像?

时间:2015-03-14 06:58:20

标签: ios

- (void)pickImage {

  UIImagePickerController *picker = [[UIImagePickerController alloc] init];
  picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
  picker.delegate = self;
  [self presentViewController:picker animated:YES completion:nil];
}

- (void)imagePickerController:(UIImagePickerController *)picker
    didFinishPickingMediaWithInfo:(NSDictionary *)info {

  _image = (UIImage *)[info objectForKey:UIImagePickerControllerOriginalImage];
  [_imageView setImage:_image];
  [self.view addSubview:_imageView];
  [self dismissViewControllerAnimated:YES completion:^{}];
}

1 个答案:

答案 0 :(得分:1)

您无法同时选择多张照片或视频 您必须使用自定义ImagePicker。我认为ELCImagePickerController是我认为最好的选择。

还有一些其他库可以使用..
ELCImagePickerController
WSAssetPickerController
QBImagePickerController
ZCImagePickerController
CTAssetsPickerController
AGImagePickerController