我将视频从照片库存储在我的文档目录中。现在我想显示存储在我的文档目录中的所有视频.. 但我不知道它怎么可能???实际上我想显示所有视频,就像它在照片库中打开一样(一行中的四个视频)......当我点击任何视频时......视频开始播放......
任何人都可以帮助我,这是将所有视频从文档目录显示到 ViewController 的最佳方式......谢谢......
- (void) imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
NSURL * movieURL = [info valueForKey:UIImagePickerControllerMediaURL] ;
NSData * movieData = [NSData dataWithContentsOfURL:movieURL];
NSArray *documentPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [documentPaths objectAtIndex:0];
NSString *fullPath = [documentsDirectory stringByAppendingPathComponent:[[self imageNameTextField]text]];
fullPath = [fullPath stringByAppendingFormat:@".MOV"];
[ movieData writeToFile:fullPath atomically:YES];
}