UIImageView |无法识别的选择器发送到实例 |Xcode 6.4 |iOS 8.4 [英] UIImageView | unrecognized selector sent to instance | Xcode 6.4 | iOS 8.4

查看:19
本文介绍了UIImageView |无法识别的选择器发送到实例 |Xcode 6.4 |iOS 8.4的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 Xcode 的新手,我的任务是将代码从 iOS 6.1 迁移到 8.4,但是那里有很多不推荐使用的方法.我解决了它们(我希望如此),但现在我遇到了一个新问题.

I'm new at Xcode, and my task was to migrate the code from iOS 6.1 to 8.4, but there where so many deprecated methods. I solved them (I hope so), but now I got a new problem.

我使用的代码是这个:

[self.clientImageView sd_setImageWithURL:[NSURL URLWithString:_client.imageURL] placeholderImage:[UIImage imageNamed:@"placeholder.png"]]; 

我得到这个错误:

[UIImageView sd_setImageWithURL:placeholderImage:]:无法识别的选择器发送到实例 0x7fbe937a88b0

最后,我明白了:

* 由于未捕获的异常NSInvalidArgumentException"而终止应用程序,原因:'-[UIImageView sd_setImageWithURL:placeholderImage:]:无法识别的选择器发送到实例 0x7fbe937a88b0'

非常感谢.

推荐答案

作者:SDWebImage

参见 https://github.com/rs/SDWebImage#add-linker-flag.正确设置标志应该解决这个问题.顺便说一句:我强烈建议你们切换到 CocoaPods,这样这些问题就会永远不会出现.

See https://github.com/rs/SDWebImage#add-linker-flag. Correctly setting the flags should take care of the issue. BTW: I strongly recommend you guys switch to CocoaPods, that way those issues will never arise.

这篇关于UIImageView |无法识别的选择器发送到实例 |Xcode 6.4 |iOS 8.4的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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