Ali
Ali

Reputation: 643

Open Camera in a Custom view

I want to implement a mechanism that lets users, just after launching the application, open camera in a custom view.

For that, I used the AVCam example provided by Apple available Here. But it doesn't work properly. I'll explain more by images:

What I need is that :

Concept

What I actually have is that :

Bounds problem

What I need is really to fill the all view (to have a square image).

Will that be possible using the AVFoundation Framework ?

Thanks and best regards.

Upvotes: 0

Views: 224

Answers (1)

Léo Natan
Léo Natan

Reputation: 57060

Use UIImagePickerController with a custom view. Setup your custom view to appear as you need it, and use the cameraOverlayView to add it to the image picker. Remember to set showsCameraControls to NO to remove native controls.

When tapping your camera button, call the picker's takePicture method to take the picture.

Upvotes: 1

Related Questions