我在 iOS 7 设备上显示 UIImagePickerController 时遇到问题。我使用以下代码来呈现图像选择器。
UIImagePickerController *cameraUI = [[UIImagePickerController alloc] init];
cameraUI.sourceType = UIImagePickerControllerSourceTypeCamera;
cameraUI.mediaTypes = [UIImagePickerController availableMediaTypesForSourceType:UIImagePickerControllerSourceTypeCamera];
cameraUI.cameraCaptureMode = UIImagePickerControllerCameraCaptureModePhoto;
cameraUI.delegate = self;
[[self presentViewController:cameraUI animated:YES completion:NULL];
在调用 presentViewController 后,应用程序由于 exec 错误访问而崩溃。控制台报告以下异常。
[SBSAccelerometer valueRestriction]: unrecognized selector sent to instance 0x1650e360
[__NSCFNumber valueRestriction]: unrecognized selector sent to instance 0x146d0e70
我启用了僵尸来查看一个对象是否被过早地释放。Zombies 报告以下异常:
[NSISRestrictedToNonNegativeVariable retain]: message sent to deallocated instance 0x156f0010
有什么想法吗?
编辑
这是我在启用僵尸时收到的堆栈跟踪: