Last active
July 20, 2018 04:09
-
-
Save SongJiaqiang/1faeaba490cf1ec47b9fe757fa713f15 to your computer and use it in GitHub Desktop.
从相册选取视频
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)pickVideoFromAlbum { | |
UIImagePickerController *videoPicker = [[UIImagePickerController alloc] init]; | |
videoPicker.delegate = self; | |
videoPicker.modalPresentationStyle = UIModalPresentationCurrentContext; | |
videoPicker.mediaTypes =[UIImagePickerController availableMediaTypesForSourceType:UIImagePickerControllerSourceTypePhotoLibrary]; | |
videoPicker.mediaTypes = @[(NSString*)kUTTypeMovie, (NSString*)kUTTypeAVIMovie, (NSString*)kUTTypeVideo, (NSString*)kUTTypeMPEG4]; | |
videoPicker.videoQuality = UIImagePickerControllerQualityTypeHigh; | |
[self presentViewController:videoPicker animated:YES completion:nil]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment