UIImagePickerController在iOS5上崩溃,但在iOS6 +上工作正常

时间:2013-09-03 15:40:19

标签: ios uiimagepickercontroller

我的以下代码在iOS6 +上正常工作,但每次第三次时都会在iOS5上崩溃,是的,它工作正常2次,第3次崩溃。我没有做任何想要只是一次又一次地敲击同一个按钮。一个调用此方法的按钮,其中包含以下代码行。

self.imagePopover = nil;
UIImagePickerController* imagePicker = [[UIImagePickerController alloc] init];
imagePicker.delegate = self;
imagePicker.sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum;
UIPopoverController *imagePop = [[UIPopoverController alloc] initWithContentViewController:imagePicker];
[imagePop presentPopoverFromRect:self.profileImageButton.frame inView:self.profileImageButton permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
self.imagePopover = imagePop;

- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker
{
     picker.delegate = nil;
     [self.imagePopover dismissPopoverAnimated:YES];
}

以下是它在崩溃中的说法

*** -[PLUISavedPhotosAlbumViewController hash]: message sent to deallocated instance 0x6dbd390

有些时间PLUISavedPhotosAlbumViewControllerUIImagePickerController替换,但是日志格式相同Something哈希]:消息被发送到解除分配的实例something。它从第一段代码

开始跟随崩溃
 [imagePop presentPopoverFromRect:self.profileImageButton.frame inView:self.profileImageButton permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];

0 个答案:

没有答案
相关问题