2013-08-23 78 views
0

我已經實現並正確安裝了框架,它花了我幾天,也是新的這個,事情是我有這個圖像從網絡,所以我解析它,然後想要加載這些圖像使用SDImageView,但編譯有此異常IM後SDWebImage發送未知的異常

-[UIImageView setImageWithURL:placeholderImage:]: unrecognized selector sent to instance 0x75b9730 
[2456:11303] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIImageView setImageWithURL:placeholderImage:]: unrecognized selector sent to instance 0x75b9730' 

當我刪除佔位符值這個異常出現

-[UIImageView setImageWithURL:]: unrecognized selector sent to instance 0x7555960 
[2236:11303] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIImageView setImageWithURL:]: unrecognized selector sent to instance 0x7555960' 

我的代碼也是這樣的:

NSString *imageLink = [currentData imageLinkFromWeb]; 
[cell.imageView setImageWithURL:[NSURL URLWithString:imageLink] placeholderImage:[UIImage imageNamed:@"image.jpg"]]; 
+0

您是否添加了'#import '?你有構建警告嗎?你怎麼知道'在崩潰時已經正確實現並安裝了框架? – Wain

+1

看起來您在配置SDWebImage時錯過了一些東西。對SDWebImage的引用缺失。 – OMK

+0

以及我在該頁面上提供了一個介紹http://iosmadesimple.blogspot.com/2013/04/lazy-image-loading.html,並完成了它所說的所有事情。但在最後我有例外,是的,我還添加了#import

回答

0

我也遇到過。對我來說,這是由於不向構建設置添加-ObjC鏈接器標誌。添加標誌的說明是here。祝你好運!