本文介绍了使用未声明的标识符'kUTTypeMovie'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我收到错误消息 - 在以下代码中使用未声明的标识符'kUTTypeMovie'
I am getting the error message - Use of undeclared identifier 'kUTTypeMovie'
-
-(IBAction)selectVideo:(id)sender {
UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init];
imagePicker.sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum;
imagePicker.mediaTypes = [[NSArray alloc] initWithObjects:(NSString *)kUTTypeMovie, nil];
imagePicker.delegate = self;
[self presentModalViewController:imagePicker animated:YES];
}
它出了什么问题?
谢谢
推荐答案
您必须将框架MobileCoreServices添加到项目中,然后导入它:
You have to add the framework MobileCoreServices to the project, and then import it:
#import <MobileCoreServices/MobileCoreServices.h>
这将使问题消失。
这篇关于使用未声明的标识符'kUTTypeMovie'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!