I use UIImagePickerController
to get the image. I am 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 I accidentally get a preview in the form of a black screen, if this happens once, then it will never be restored until we destroy and restart the application.
I get the correct image from the UIImagePickerControllerDelegate
, but I have this preview problem when the UIImagePickerController
has the camera as the source type.
source share