UIImageView | unrecognized selector sent to instance | Xcode 6.4 | iOS 8.4(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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:UIImageView |无法识别的选择器发送到实例 |Xcode 6.4 |iOS 8.4
基础教程推荐
- NSString intValue 不能用于检索电话号码 2022-01-01
- Cocos2d iPhone 非矩形精灵触摸检测 2022-01-01
- 通过重定向链接在 Google Play 中打开应用 2022-01-01
- libGDX 从精灵或纹理中获取像素颜色 2022-01-01
- iPhone - 获取给定地点/时区的当前日期和时间并将其与同一地点的另一个日期/时间进行比较的正确方法 2022-01-01
- iOS4 创建后台定时器 2022-01-01
- navigator.geolocation.getCurrentPosition 在 Android 浏览器上 2022-01-01
- AdMob 广告未在模拟器中显示 2022-01-01
- Android:getLastKnownLocation(LocationManager.NETWORK_PROVIDER 2022-01-01
- 如何从 logcat 中删除旧数据? 2022-01-01
