2012-08-28 36 views
0

在我的iPhone應用程序,當我使用UIImagePickerControllerSourceTypePhotoLibrary作爲源類型,打開它5次後,我得到:從照片庫多次獲取圖像顯示錯誤

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

也拾取的圖像消失了。

如果([的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]; 
} 

而在方法:

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

我駁回modalviewController。

+0

顯示你的代碼! –

回答

0

它與創建多個UIImagePickerControllers有關。您一次只能呈現一個圖像選擇器控制器,因此也許您應該在第一次調用grabImage時創建一個,然後重新使用它,而不是每次都創建一個。

參考thisthisthis鏈接

+0

我有它在viewDidLoad方法初始化,它只分配一次,並在dealloc方法釋放 – AJS

+0

引用答案中的所有鏈接 –

+0

我已經引用所有這些,並嘗試each.But沒有任何幫助。 – AJS

相關問題