0
使用以下代码启动图像选择器来捕获图像。
任何一个可以帮帮忙,关闭这个问题...iOS 7 - UIImagePickerController中的黑色预览屏幕
if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera])
{
if (self.camera)
{
self.camera = nil;
}
self.camera = [[UIImagePickerController alloc] init];
self.camera.sourceType = UIImagePickerControllerSourceTypeCamera;
self.camera.allowsEditing = NO;
self.camera.delegate = self;
[self presentViewController:self.camera animated:YES completion:NULL];
}
如果您在后台有任何GCD,启动UIImagePickerController之前可能是此问题的原因。在我的代码中有启动UIImagePickerController之前GCD,现在删除了GCD它工作正常。 – Chid