tags:

views:

106

answers:

1

Hi,

I can launch a camera capture with UIImagePicker but capture process is done in another view. Is it possible to 'embed' camera preview into the application window?

What I use is:

UIImagePickerController *picker;
picker = [[UIImagePickerController alloc]init];
picker.sourceType = UIImagePickerControllerSourceTypeCamera;
picker.allowsImageEditing = YES;
picker.delegate = self;
[self presentModalViewController:picker animated:YES];
+2  A: 

The closest you can come is to add a cameraOverlayView to the camera view and put a 'frame' around the picture. However, this will crop, rather than scale, the viewfinder.

Ben Gottlieb
just to clarify, does this need os 3.1? and if i get screenshot with this, can i get camera's preview? or just the 'frame' and a blank rectangle?
paul simmons
Yes, this requires 3.1, and if you use UIGetScreenImage(), I believe you'll get the whole screen, camera view + overlay.
Ben Gottlieb