xcode iPhone,“尝试注册的过滤专辑列表超过最多 5 个。这将失败。” 错误

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/7167373/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 21:47:58  来源:igfitidea点击:

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

iphonexcodeuiimageuiimagepickercontroller

提问by SolidSnake4444

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.

当我尝试从照片库中读取图像时,我收到错误消息,“尝试注册的过滤相册列表超过最多 5 个。这将失败。” 图像未读取。

Any idea how to fix this?

知道如何解决这个问题吗?

回答by iHS

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

我希望它有帮助

回答by Krishna

Instead of this

而不是这个

self.sourceType =UIImagePickerControllerSourceTypePhotoLibrary;

Use

self.sourceType =UIImagePickerControllerSourceTypeSavedPhotosAlbum;

回答by darrinm

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.

共识(https://stackoverflow.com/questions/7689119/ios-5-gm-error-more-than-maximum-5-filtered-album-lists-trying-to-register)是Apple的错误,因为甚至他们自己的例子也遇到了它。雷达已针对它提起诉讼。

回答by Sebastian S?ndergaard

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 :)

我只是设置了“picker = nil;” 关闭 ModalViewController 后,它就完美运行了 :)

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

希望它也能帮助你:)

回答by flypig

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.

当分配和呈现 UIImagePickerController 超过 5 次时会发生这种情况......我猜 IOS 在释放/关闭 UIImagePickerController 时忘记取消注册某些东西。

回答by Suraj Mirajkar

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

如需帮助,请点击链接:http: //skhousee.blogspot.in/2012/06/error-more-than-max-5-filtered-album.html

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

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

ipc.delegate = self;

ipc.delegate = self;

ipc.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;

ipc.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;

[self presentModalViewController:ipc animated:YES];

[self presentModalViewController:ipc 动画:YES];

[ipc release];

[ipc 发布];

-(void)viewDidAppear:(BOOL)animated {

-(void)viewDidAppear:(BOOL)动画{

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

}

}

回答by SolidSnake4444

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

答案是该问题仅在 iOS 5 Beta 6 中出现。更新到 Beta 7 后,该问题现已消失。