Obtener la imagen de la biblioteca de fotos varias veces muestra un error

In my iPhone app , when I use UIImagePickerControllerSourceTypePhotoLibrary as the source type, after opening it for 5 times , I get :

<Error>: More than maximum 5 filtered album lists trying to register. This will fail.

in my console.And also the image picked is gone.

if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypePhotoLibrary]==YES) {

UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init];
imagePicker.delegate = self;    
imagePicker.allowsEditing = YES;
imagePicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
[self presentModalViewController:imagePicker animated:YES];
[imagePicker release]; 
}

And in method:

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

I dismiss the modalviewController.

preguntado el 28 de agosto de 12 a las 13:08

1 Respuestas

It is related to creating multiple UIImagePickerControllers. You're only presenting one image picker controller at a time, so maybe you should create one the first time you call your grabImage and then reuse it instead of creating a new one each time.

Remitir este y este y también este enlaces

contestado el 23 de mayo de 17 a las 13:05

I have it initialized in viewDidLoad method and it is allocated only once and released in dealloc method - AJS

i think its better to ignore it - Paresh Navadiya

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.