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


基础教程推荐
- 如何在没有IB的情况下将2个按钮添加到右侧的UINavigationbar? 2022-01-01
- android 应用程序已发布,但在 google play 中找不到 2022-01-01
- 当从同一个组件调用时,两个 IBAction 触发的顺序是什么? 2022-01-01
- UIWebView 委托方法 shouldStartLoadWithRequest:在 WKWebView 中等效? 2022-01-01
- 如何让对象对 Cocos2D 中的触摸做出反应? 2022-01-01
- Kivy Buildozer 无法构建 apk,命令失败:./distribute.sh -m “kivy"d 2022-01-01
- Android:对话框关闭而不调用关闭 2022-01-01
- 如何在 UIImageView 中异步加载图像? 2022-01-01
- 在 gmail 中为 ios 应用程序检索朋友的朋友 2022-01-01
- 如何在 iPhone 上显示来自 API 的 HTML 文本? 2022-01-01