我想使用UIImagePickerController
创建原始图像。我这样做但是在这行uiipc.mediaTypes=@[(NSString *)kUTTypeRawImage];
崩溃报告中遇到崩溃说:
由于未捕获的异常'NSInvalidArgumentException'而终止应用程序,原因:'没有源1的可用类型'。
此处代码
UIImagePickerController *uiipc = [[UIImagePickerController alloc] init];
uiipc.delegate=self;
uiipc.mediaTypes=[UIImagePickerController availableMediaTypesForSourceType:uiipc.sourceType];
// uiipc.mediaTypes = @[(NSString *)kUTTypeImage];
uiipc.mediaTypes=@[(NSString *)kUTTypeRawImage];// Getting crash here
uiipc.sourceType = UIImagePickerControllerSourceTypeCamera;
uiipc.allowsEditing = YES;
_imgPickViewController=uiipc;
[self presentViewController:_imgPickViewController animated:NO completion:nil];