这是 crashlytics 报告的一个问题。当我加载图像选择器并关闭时,我得到了这个(我假设)。我只得到过一次。但它与图像选择器或导航控制器有关。有人知道原因吗?
更新 图像选择器相机是这样加载的。
UIImagePickerController *imagePickerController = [[UIImagePickerController alloc] init];
imagePickerController.modalPresentationStyle = UIModalPresentationFullScreen;
imagePickerController.sourceType = UIImagePickerControllerSourceTypeCamera;
imagePickerController.delegate = self;
if([UIApplication sharedApplication].statusBarOrientation == UIInterfaceOrientationLandscapeLeft)
{
[[UIDevice currentDevice]setValue:[NSNumber numberWithInteger:UIDeviceOrientationLandscapeRight] forKey:ORIENTATION_STRING];
} else {
[[UIDevice currentDevice]setValue:[NSNumber numberWithInteger:UIDeviceOrientationLandscapeLeft] forKey:ORIENTATION_STRING];
}
self.imagePickerController = imagePickerController;
[self.navigationController presentViewController:self.imagePickerController animated:YES completion:nil];
对于其他源类型,我使用以下代码。
UIImagePickerController *imagePickerController = [[UIImagePickerController alloc] init];
imagePickerController.sourceType = sourceType;
imagePickerController.delegate = self;
popOver = [[UIPopoverController alloc] initWithContentViewController:imagePickerController];
self.imagePickerController = imagePickerController;
popOver.delegate = self;
CGRect popOverRect = sender.frame;
[popOver presentPopoverFromRect:popOverRect
inView:self.view
permittedArrowDirections:UIPopoverArrowDirectionRight animated:YES];