加载图像时 asyncImageView 崩溃

asyncImageView crashing while loading images

使用 asyncImageView 加载带有 url 的图像集时遇到崩溃问题。我收到的错误是 -[__NSCFString isFileURL]: unrecognized selector sent to instance

在 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。