Fernando Santiago
Fernando Santiago

Reputation: 2288

Show preview image on UIImagePickerController after picture took

i have the next code to take a picture:

    UIImagePickerController * picker = [[UIImagePickerController alloc] init];
    picker.view.tag = 2;
    picker.delegate = self;
    picker.sourceType = UIImagePickerControllerSourceTypeCamera;
    picker.cameraCaptureMode = UIImagePickerControllerCameraCaptureModePhoto;
    picker.cameraDevice = UIImagePickerControllerCameraDeviceFront;
    [self presentViewController:picker animated:YES completion:nil];

This code open the camera aplication and takes a pictures, the problem is: When the picture is took, it automatically shows a preview of it, but it shows the picture mirrored, how can i show the picture just as it is? i think i am missing a paramter but i have google it with no luck.

Upvotes: 2

Views: 2513

Answers (1)

dominikweifieg
dominikweifieg

Reputation: 91

This is the standard behavior of the front camera. If you try to take a picture with the build in camera app it will not show the preview image mirrored but will save the image as mirrored image.

You will need to apply a transform on the image picker view to achieve what you want. Please take a look here:

Front facing camera in UIImagePickerController

Upvotes: 1

Related Questions