Possible Duplicate:
How do you create a custom camera view, instead of UIImagePickerViewController?
Many image sharing apps available today from the App Store use a custom camera instead of the standard camera picker provided by Apple.
Does anyone know any tutorials or tips for creating a custom camera?
Step 1: Open a suitable image in the Photos app on your iPhone. Step 2: Touch and briefly hold the subject of the photo until a glowing outline appears. Step 3: Begin moving your finger without lifting it. You should see a copy of the subject being dragged out of the photo with your finger.
Yes, create a UIImagePickerController from code, adjust its properties, add an overlay onto it, and with you controller, control whatever you want on that overlay : custom controls, overlaying images, etc...
That gives something like this :
self.picker = [[UIImagePickerController alloc] init];
self.picker.sourceType = UIImagePickerControllerSourceTypeCamera;
self.picker.cameraCaptureMode = UIImagePickerControllerCameraCaptureModePhoto;
self.picker.cameraDevice = UIImagePickerControllerCameraDeviceRear;
self.picker.showsCameraControls = NO;
self.picker.navigationBarHidden = YES;
self.picker.toolbarHidden = YES;
self.picker.wantsFullScreenLayout = YES;
// Insert the overlay
self.overlay = [[OverlayViewController alloc] initWithNibName:@"Overlay" bundle:nil];
self.overlay.pickerReference = self.picker;
self.picker.cameraOverlayView = self.overlay.view;
self.picker.delegate = self.overlay;
[self presentModalViewController:self.picker animated:NO];
OverlayViewController
is the controller that you must write to control everything you add onto the overlay.
pickerReference
is a property you can keep to send orders to the camera. For example, you could call the following from an IBAction coming from a UIButton placed onto the overlay :
[self.pickerReference takePicture];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With