Ios imagePickerController: didFinishPickingMediaWithInfo: not called after stopping VideoCapture

I am creating a custom overlay view for video recording.

I added a button to start / stop recording:

[takePhotoBut addTarget:imagePickerController action:@selector(toogleRecord:) forControlEvents:UIControlEventTouchUpInside];

      

which calls [super startVideoCapture];

or [super stopVideoCapture];

in my custom UIImagePickerController

. Also I have set the delegate

    CustomPickerController *imagePickerController= [[CustomPickerController alloc]init];
    imagePickerController.allowsEditing = NO;
    imagePickerController.delegate = self;

      

and I expect to be notified about imagePickerController:didFinishPickingMediaWithInfo:

, but I am not getting a response. I believe this is happening because ios is waiting for the user to click Use Video. But I want to receive notifications without clicking on this button. Are there any workarounds?

EDIT 1

how i represent ImagePicker:

[self presentViewController:imagePickerController animated:YES completion:nil];

      

This is not a property of my VC.

+3


source to share


2 answers


Check if your imagePickerController is set cameraCaptureMode

toUIImagePickerControllerCameraCaptureModeVideo

imagePickerController.cameraCaptureMode = UIImagePickerControllerCameraCaptureModeVideo;

      



This solves my problem.

+1


source


I had the same problem. Fixed hiding camera controls.



imagePickerController.showsCameraControls = NO;

0


source







All Articles