Obtener la imagen de la biblioteca de fotos varias veces muestra un error
Frecuentes
Visto 382 veces
0
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.
1 Respuestas
0
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.
contestado el 23 de mayo de 17 a las 13:05
No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas objective-c ios5 uiimagepickercontroller or haz tu propia pregunta.
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