How Can i Get the List of all Video files from Library in ios sdk

前端 未结 7 2440
[愿得一人]
[愿得一人] 2020-12-09 06:13

Hi I\'m working On videos , i would like get the list of video files from library to Display and playing the Videos in my app. can any one help me.

7条回答
  •  眼角桃花
    2020-12-09 06:58

    It will open photo library and only display the movie type content.

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

提交回复
热议问题