0
我使用一个UIWebView来显示的项目图标:的UIWebView在UITableViewCell中的显示在我的UITableViewCell定义图标
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"Cell"];
if (!cell) {
cell = [[[NSBundle mainBundle] loadNibNamed:@"PostCell" owner:self options:nil] objectAtIndex:0];
}
NSDictionary *post = [posts objectAtIndex:indexPath.row];
UIWebView *iconWebView = (UIWebView*)[[cell contentView] viewWithTag:1];
[iconWebView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:[post objectForKey:@"mMediumResImage"]] cachePolicy:NSURLRequestReturnCacheDataElseLoad timeoutInterval:60.0f]];
的mMediumResImage
是指向同尺寸的图像周围40-60 KB的URL。
UITableView
持有的行数是〜20-30。
除了查看图标,没有用户交互,图标没有预期的功能。我宁愿使用UIWebView
比设置一个队列来将每个图标加载到一个数组中,要求我跟踪我的加载过程,完成一次更新的哪个indexpath等。此方法允许我快速简单地显示一个图标。
这是不是使用了UIWebView?
如果是这样,你有什么建议作为替代?