SDWebImage UIImageView + WebCache在64位设备上崩溃

我有这个代码:

#import  - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { [cell.thumbnail setImageWithURL:[NSURL URLWithString:thumbnailURL] placeholderImage:[UIImage animatedImageWithImages:loadingArray duration:1] options:indexPath.row == 0 ? SDWebImageRefreshCached : 0]; } 

其中“loadingArray”只是一个png图像数组。 cellForRowAtIndexPath显然有很多代码。

此代码适用于32位设备和32位仿真器,但它在64位设备和64位仿真器上崩溃。

这是XCode的崩溃报告:

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

我正在使用今天重新下载的SDWebImage-3.6框架(2014年4月22日)清理项目,将应用程序重新添加到模拟器……同样的问题。

任何解决此问题的建议都将受到高度赞赏。 谢谢。

我已经通过将SDWebImage的Build设置更改为“(armv7,arm64)”解决了这个问题。 在“NSLog”中有一些错误,但这些都很容易修复,除了你需要更改以下内容:

 - (int)getMemoryCount { return [[memCache allKeys] count]; } 

在SDImageCache.m中

 - (int)getMemoryCount { return (int)[[memCache allKeys] count]; }