IPhone sdk - using a custom camera

I am developing an application that should take two photos in a row. I am currently using an iPhone camera, but:

  • I would not want to cancel in the lower left
  • I would like for me not to have a preview of my image (with a blue "use" button).

What should I do? Should I make my own camera? I could not find a simple tutorial for a custom camera with a snapshot button ...

+3
source share
2 answers

- UIImagePickerController showsCameraControls, , , cameraOverlayView; , . takePicture , , dismissModalViewControllerAnimated:, .

+2

UIImagePickerController , , , , : , ..

- :

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 - , , , .

pickerReference - , . , IBAction, UIButton, :

[self.pickerReference takePicture];
+7

Source: https://habr.com/ru/post/1796049/


All Articles