0
    //---------- viewController.h file has 

    IBOutlet UIView *viewCamera; // custom view for taking camera reason    

    //------------viewController.m :: inside viewDidLoad method
    // -- camera start
            [viewCamera setBackgroundColor:[UIColor clearColor]];

            imgPicker = [UIImagePickerController new];
            imgPicker.allowsEditing = YES;
            imgPicker.delegate = self;    


            imgPicker.cameraOverlayView = viewCamera;


            imgPicker.sourceType = UIImagePickerControllerSourceTypeCamera;
            [self presentViewController:imgPicker animated:NO completion:nil];


// ----- ob btn clicked 
- (IBAction)btnTakePhotoPressed:(id)sender{
    [imgPicker takePicture];
}

enter image description here

App is crashed due to this line, if I comment this line code is running but camera is open in full view, I want to add my camera access on my custom view.

imgPicker.cameraOverlayView = viewCamera;

Thanks in advance :)

gauravds
  • 2,931
  • 2
  • 28
  • 45
  • cameraOverlay view isa for displaying a view inside of an image picker, is that what you want? From what I can tell, you want to display the image picker inside your own view. – Oxcug Jul 05 '14 at 08:12
  • yes I want to display the image picker inside my own view. – gauravds Jul 05 '14 at 08:50

0 Answers0