Skip viewing view UIImagePickerController?

I use UIImagePickerController to allow my user to select a video from a resource library.

When the UIImagePickerController is first displayed, it displays thumbnails for the various films that have been recorded.

As soon as the user selects a movie, it displays a β€œpreview” that allows them to play back and possibly edit the selected movie.

Is there a way to avoid displaying this view and instead return the movie that was selected on the thumbnail screen?

Here is the code I'm using:

UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init]; imagePicker.delegate = self; imagePicker.mediaTypes = [NSArray arrayWithObject:(NSString *)kUTTypeMovie]; imagePicker.allowsEditing = NO; [self presentModalViewController:imagePicker animated:YES]; 
+7
iphone video movie uiimagepickercontroller
source share
2 answers

I have not tested this myself, although in the near future I will try to do this in my own application. If you look at the UIImagePickerControllerCameraControls documentation , then it refers to the fact that if you eliminate the camera controls, you can take as many photos as you want.

Thus, in theory, if you set showCameraControls to NO and assign your own CameraOverlayView UIView to allow the user to take a picture, you can reject the image picker without looking at the preview view.

+5
source share

Perhaps this helps. You can listen with NSNotificationCenter at @ "_ UIImagePickerControllerUserDidCaptureItem" . If the user selects an item, you can reject the imagePicker and make your thumbnail file.

I had a similar problem to remove the overlay in the preview view and solve this issue using this approach .

0
source share

All Articles