here is my code to pick videos from imagePicker:
imagepicker = [[UIImagePickerController alloc] init];
[imagepicker setDelegate:self];
NSArray *mediaTypesAllowed = [UIImagePickerController availableMediaTypesForSourceType:UIImagePickerControllerSourceTypePhotoLibrary];
[imagepicker setMediaTypes:mediaTypesAllowed];
imagepicker.wantsFullScreenLayout = YES;
pickImagePop = [[UIPopoverController alloc] initWithContentViewController:imagepicker];
[pickImagePop setDelegate:self];
[pickImagePop presentPopoverFromRect:CGRectMake(60, 100, 1, 20) inView:self.view permittedArrowDirections:UIPopoverArrowDirectionUp animated:YES];
[pickImagePop setPopoverContentSize:CGSizeMake(320, 400) animated:YES];
But this code shows photos and videos together in Picker. I want to show only video. How can I do that?
If you only want videos you should add:
Remember to add the
MobileCoreServicesframework to your project.EDIT:
You should check beforehand which types can be used by the device with the following method.
It will return an array with all the media types supported by the device.