- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
使用 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。
关于ios - 加载图像时 asyncImageView 崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28644466/
使用 asyncImageView 加载带有 url 的图像集时遇到崩溃问题。我收到的错误是 -[__NSCFString isFileURL]: unrecognized selector sent
我刚刚更新到 Xcode 7 和 Swift 2.0,当然它在我的应用程序中引起了一些问题。我已经解决了很多问题,但我正在努力解决这个问题。 在我的 TableView 中,我正在加载来自 Parse
在我的项目中,我需要使用AsyncImageView 来加载图像。我还希望这些图像是圆形的。图像主要出现在表格 View 中,因此我无法在 AsyncImageView 层上使用圆角,因为这会对应用程
在我的应用程序中,我使用 AsyncImageView 库异步加载和显示图像,它还声称它缓存了图像。 图书馆可以在这里找到:https://github.com/nicklockwood/AsyncI
我使用 AsyncImageView 从 url 加载图像。但是图像没有加载到 ImageView 宽度。下面是我的代码。 { AsyncImageView *asyImage; as
//UITableView NSString *data_image; data_image = [[message_array objectAtIndex:indexPath.row] val
我开发了一个使用 Asyncimageview 和 iCarousel 的应用程序。但我的问题是,当我尝试从 url 加载图像时,我的 iCarousel 的每个 View 中仅加载事件指示器,而没有
我是一名优秀的程序员,十分优秀!