3

I want to use custom camera overlay view. Below is the code for it.

imagePicker = [[UIImagePickerController alloc] init];
self.imagePicker.delegate = self;
self.imagePicker.sourceType = UIImagePickerControllerSourceTypeCamera;
self.imagePicker.showsCameraControls = NO;
self.imagePicker.cameraDevice = UIImagePickerControllerCameraDeviceFront;
self.imagePicker.toolbarHidden = YES;
self.imagePicker.wantsFullScreenLayout = YES;
self.imagePicker.navigationBarHidden = YES;
self.imagePicker.cameraOverlayView = [self cameraOverlayView];

The issue is there is a black background at bottom and I don't get from where it is coming. What is wrong in code?

Geek
  • 8,280
  • 17
  • 73
  • 137

1 Answers1

3

Try cameraViewTransform for full screen.

    CGFloat camScaleup = 2;
    imagePicker.cameraViewTransform = CGAffineTransformScale(imagePicker.cameraViewTransform, camScaleup, camScaleup);
Toseef Khilji
  • 17,192
  • 12
  • 80
  • 121