Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to import video from library in iPhone into my application?

I know that this question been asked before, but I'm getting an error while I'm running this code for picking video.

-(void)video
{

UIImagePickerController *imagePicker =
[[UIImagePickerController alloc] init];
imagePicker.delegate = self;
imagePicker.sourceType = 
UIImagePickerControllerSourceTypePhotoLibrary;
imagePicker.mediaTypes = [[NSArray alloc] initWithObjects:(NSString *)kUTTypeMovie,nil];

[self presentModalViewController:imagePicker animated:YES];

}

This code taking me to a window where video should appear. But the window is blank. The message showing is "No Videos you can sync photos and videos onto your iPod.............albums and videos" . I know that this message shows when there is no videos in video library. But I import lot of videos and still showing this error.

like image 815
Amitabha Avatar asked Oct 06 '22 20:10

Amitabha


1 Answers

You should take a look at this "HowTo" : http://www.raywenderlich.com/13418/how-to-play-record-edit-videos-in-ios. It helped me a lot.
You will only need the first part.

like image 122
aimak Avatar answered Oct 10 '22 01:10

aimak