创建具有未知类型的图像格式是错误Objective-C Xcode 8 [英] Creating an image format with an unknown type is an error Objective-C Xcode 8

查看:120
本文介绍了创建具有未知类型的图像格式是错误Objective-C Xcode 8的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

iOS 10中的图像选择器中选择图像时 Objective-C Xcode 8 。我收到错误 -

While choosing an image from the image picker in iOS 10 Objective-C and Xcode 8. I am getting an error -


创建包含未知类型的图片格式是错误

以前版本没问题。

这是我的代码:

UIImagePickerController* imgPicker=[[UIImagePickerController alloc] init];
imgPicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
imgPicker.delegate = self;
[self presentViewController:imgPicker animated:YES completion:nil];

以及重拍图片的委托方法是..

and the delegate method to recive the image is..

- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
       [picker dismissViewControllerAnimated:YES completion:NULL];
       UIImage *myImage = [info objectForKey:UIImagePickerControllerOriginalImage];
}

我还尝试了其他委托功能..

I also tried other delegate function..

 -(void) imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary<NSString *,id> *)info{
}

但错误没有。

but error not going.

我是不确定是Xcode 8的错误吗?
如果任何人遇到问题并解决了请帮助修复它。

I am not sure is it the bug of Xcode 8?
If any one faced the issue and solved please help to fix it.

推荐答案

<这是一个错误。这只是一个错误的警告。应用程序的工作没有坏事,所以忽略警告。

It's a bug. It's just a false warning. No bad thing is happening to the working of the app, so ignore the warning.

这篇关于创建具有未知类型的图像格式是错误Objective-C Xcode 8的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆