Quote:
Originally Posted by sharhelia
Thank you so much for reply, it was a great help
|
I am trying to do something similar, but still can't get the takePicture method to work correctly.
Have you had any luck?
I'm trying to capture an image automatically without pushing the capture button. To do this, I create an overlay and then call takePicture:
Code:
imgPicker = [[UIImagePickerController alloc] init];
imgPicker.delegate = self;
imgPicker.sourceType = UIImagePickerControllerSourceTypeCamera;
imgPicker.allowsEditing = NO;
imgPicker.showsCameraControls = NO;
imgPicker.wantsFullScreenLayout = NO;
imgPicker.view = cameraOverlayView;
[self presentModalViewController:imgPicker animated:YES];
[imgPicker takePicture];
printf("should have taken picture");
[[imgPicker parentViewController] dismissModalViewControllerAnimated:YES];
The problem is that for some reason I can't get access to the picture that should be captured. I have the following method in my code but it never seems to get called:
Code:
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info{
printf("Did finish picking with info");
[picker release];
}
Any suggestions?