iPhone, “More than maximum 5 filtered album lists trying to register. This will fail.” Error

为君一笑 提交于 2019-11-26 16:21:10

问题


When I try to read an image from the photo library I get the error, "More than maximum 5 filtered album lists trying to register. This will fail." The image is not read.

Any idea how to fix this?


回答1:


I think you are not checking the source type. You might be doing

 self.sourceType =UIImagePickerControllerSourceTypePhotoLibrary;

If this is the case, then you have to check the source type before assigning it directly. like

 if ([UIImagePickerController isSourceTypeAvailable:
     UIImagePickerControllerSourceTypePhotoLibrary]) 
  {
       // Set source to the Photo Library
       self.sourceType =UIImagePickerControllerSourceTypePhotoLibrary;

  }

I hope it helps




回答2:


Instead of this

self.sourceType =UIImagePickerControllerSourceTypePhotoLibrary;

Use

self.sourceType =UIImagePickerControllerSourceTypeSavedPhotosAlbum;



回答3:


This worked it out for me:

- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
    [picker dismissModalViewControllerAnimated:YES];
    picker = nil;
    UIImage *image = [info objectForKey:@"UIImagePickerControllerEditedImage"];
}

I just set "picker = nil;" after dismissing the ModalViewController and then it works perfect :)

Hope it's going to help you out too :)




回答4:


The consensus (https://stackoverflow.com/questions/7689119/ios-5-gm-error-more-than-maximum-5-filtered-album-lists-trying-to-register) is that this is Apple's bug as even their own examples run into it. A radar has been filed against it.




回答5:


This is happen when allocating and presenting the UIImagePickerController more than 5 times.... I guess that the IOS forgets to de-register something when releasing/dismissing the UIImagePickerController.




回答6:


For help follow link : http://skhousee.blogspot.in/2012/06/error-more-than-max-5-filtered-album.html

UIImagePickerController *ipc = [[UIImagePickerController alloc] init];

ipc.delegate = self;

ipc.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;

[self presentModalViewController:ipc animated:YES];

[ipc release];

-(void)viewDidAppear:(BOOL)animated {

[super viewDidAppear:animated];
[self setModalInPopover:YES];

}




回答7:


The answer was the issue only showed itself in iOS 5 Beta 6. After updating to beta 7 the issue is now gone.



来源:https://stackoverflow.com/questions/7167373/iphone-more-than-maximum-5-filtered-album-lists-trying-to-register-this-will

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!