[英]Using SDWebImage to iphone
我正在為我的應用程序使用SDWebImage。
我從這個鏈接下載了ASWebImage文件
添加到myapp中。 然后我導入了UIImageView + WebCache.h
當我運行我的應用程序時,我得到例外。
這是我的代碼
self.view.backgroundColor = [UIColor whiteColor];
UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)]
[imageView setImageWithURL:[NSURL URLWithString:@"http://mydomain.com/a.jpg"]];
[self.view addSubview:imageView];
[imageView release];
當我運行這個應用程序時,我得到以下異常。
[UIImageView setImageWithURL:]: unrecognized selector sent to instance 0x6e64390
2012-08-23 19:32:14.828 test123[16941:f803] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIImageView setImageWithURL:]: unrecognized selector sent to instance 0x6e64390'
確保您已導入“ImageIO.framework”
要解決此問題,請參閱項目安裝說明。 我遇到了同樣的錯誤,但是只要我按照安裝說明操作,問題就立即解決了。
您可以在此處找到這些說明: https : //github.com/rs/SDWebImage#installation
您是否已將SDWebImage庫與您的應用相關聯? 鏈接器標志-ObjC怎么樣?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.