ios – 创建未知类型的图像格式是一个错误Objective-C Xcode 8

ios – 创建未知类型的图像格式是一个错误Objective-C Xcode 8,第1张

概述在iOS 10 Objective-C和 Xcode 8中从图像选择器中选择一个图像.我收到一个错误 – Creating an image format with an unknown type is an error . 对于以前的版本是可以的. 这是我的代码: UIImagePickerController* imgPicker=[[UIImagePickerController alloc 在iOS 10 Objective-C和 Xcode 8中从图像选择器中选择一个图像.我收到一个错误 –

Creating an image format with an unkNown type is an error

.

对于以前的版本是可以的.

这是我的代码:

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

并且代理回收图像的方法是..

- (voID)imagePickerController:(UIImagePickerController *)picker dIDFinishPickingMediawithInfo:(NSDictionary *)info {       [picker dismissVIEwControllerAnimated:YES completion:NulL];       UIImage *myImage = [info objectForKey:UIImagePickerControllerOriginalimage];}

我也试过其他委托函数..

-(voID) imagePickerController:(UIImagePickerController *)picker dIDFinishPickingMediawithInfo:(NSDictionary<Nsstring *,ID> *)info{}

但错误不行.

我不确定是Xcode 8的错误吗?如果有人面对这个问题并解决,请帮忙解决.

解决方法 这是一个BUG.这只是一个假警告.应用程序的工作没有坏事,所以忽略警告. 总结

以上是内存溢出为你收集整理的ios – 创建未知类型的图像格式是一个错误Objective-C Xcode 8全部内容,希望文章能够帮你解决ios – 创建未知类型的图像格式是一个错误Objective-C Xcode 8所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1110830.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-29
下一篇 2022-05-29

发表评论

登录后才能评论

评论列表(0条)

保存