I am using UIImagePickerController
to take image. I'm using the following code:
UIImagePickerController* UIPicker = [[UIImagePickerController alloc] init];
UIPicker.delegate = self;
UIPicker.sourceType= UIImagePickerControllerSourceTypeCamera;
[UIPicker setCameraCaptureMode:UIImagePickerControllerCameraCaptureModePhoto];
UIPicker.allowsEditing=NO;
[self presentModalViewController:UIPicker animated:YES];
[UIPicker release];
The problem is that randomly I am getting the preview as a black screen, if it happens once then it never restores until we kill and restart the application.
I am getting correct image from UIImagePickerControllerDelegate
but I have this problem with preview when UIImagePickerController
has camera as source type.