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"]];
您是否添加了'#import'?你有構建警告嗎?你怎麼知道'在崩潰時已經正確實現並安裝了框架? –
Wain
看起來您在配置SDWebImage時錯過了一些東西。對SDWebImage的引用缺失。 – OMK
以及我在該頁面上提供了一個介紹http://iosmadesimple.blogspot.com/2013/04/lazy-image-loading.html,並完成了它所說的所有事情。但在最後我有例外,是的,我還添加了#import –