我使用UIImagePickerController
來拍攝圖像。我使用下面的代碼:UIImagePickerController給我一個黑色預覽
UIImagePickerController* UIPicker = [[UIImagePickerController alloc] init];
UIPicker.delegate = self;
UIPicker.sourceType= UIImagePickerControllerSourceTypeCamera;
[UIPicker setCameraCaptureMode:UIImagePickerControllerCameraCaptureModePhoto];
UIPicker.allowsEditing=NO;
[self presentModalViewController:UIPicker animated:YES];
[UIPicker release];
的問題是,隨機我收到預覽爲黑屏,如果它發生一次,然後它永遠不會恢復,直到我們殺死並重新啓動應用程序。
我從UIImagePickerControllerDelegate
得到正確的圖像,但我有UIImagePickerController
有攝像頭作爲源類型的預覽此問題。