Ios 加载图像时asyncImageView崩溃
使用asyncImageView加载带有URL的图像集时面临崩溃问题。我收到的错误是Ios 加载图像时asyncImageView崩溃,ios,objective-c,uitableview,asyncimageview,Ios,Objective C,Uitableview,Asyncimageview,使用asyncImageView加载带有URL的图像集时面临崩溃问题。我收到的错误是-[\uu NSCFString isFileURL]:发送到实例的选择器无法识别 在cellForRowAtIndexPath中 UITableViewCell *cell = (UITableViewCell *)[tableView dequeueReusableCellWithIdentifier:@"MyCell"]; #define IMAGE_VIEW_TAG 99 if (cell==n
-[\uu NSCFString isFileURL]:发送到实例的选择器无法识别
在cellForRowAtIndexPath中
UITableViewCell *cell = (UITableViewCell *)[tableView dequeueReusableCellWithIdentifier:@"MyCell"];
#define IMAGE_VIEW_TAG 99
if (cell==nil)
{
cell=[[UITableViewCell alloc]initWithFrame:CGRectZero];
AsyncImageView *imageView = [[AsyncImageView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, 44.0f, 44.0f)];
imageView.contentMode = UIViewContentModeScaleAspectFill;
imageView.clipsToBounds = YES;
imageView.tag = IMAGE_VIEW_TAG;
[cell addSubview:imageView];
}
cell.textLabel.text = [arrTweets objectAtIndex:indexPath.row];
cell.textLabel.numberOfLines=0;
NSString *urlString=[arrProfilePics objectAtIndex:indexPath.row];
NSURL *url = [NSURL URLWithString:urlString];
AsyncImageView *imageView = (AsyncImageView *)[cell viewWithTag:IMAGE_VIEW_TAG];
[[AsyncImageLoader sharedLoader] cancelLoadingImagesForTarget:imageView];
imageView.imageURL = [arrProfilePics objectAtIndex:indexPath.row];
我想您正在使用NSString作为NSURL。您确定arrProfilePics不是空的吗?我检查过,pics URL数组不是空的,并且都是有效的urlsimageView.imageURL想要NSString或NSURL吗?因为您正在执行NSString*urlString=[arrProfilePics objectAtIndex:indexPath.row];在imageView.imageURL=[arrProfilePics objectAtIndex:indexath.row]。。。可能应该是imageView.imageURL=url?wlcm饼干…快乐的编码!!