UIImagePickerController相册选择视频

2016-01-21  本文已影响1343人  黑夜的眼睛

//UIImagePickerController相册选择视频

UIImagePickerController *picker = [[UIImagePickerController alloc] init];

//资源类型为视频库

NSString *requiredMediaType1 = ( NSString *)kUTTypeMovie;

picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;

//UIImagePickerControllerSourceTypeSavedPhotosAlbum

NSArray *arrMediaTypes=[NSArray arrayWithObjects:requiredMediaType1,nil];

[picker setMediaTypes: arrMediaTypes];

picker.delegate = (id)self;

[self presentViewController:picker animated:YES completion:nil];

上一篇 下一篇

猜你喜欢

热点阅读