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