Async Images Download in a UITableView using Storyboard & ios5

◇◆丶佛笑我妖孽 提交于 2019-12-25 05:32:47

问题


I have a UITableView and I had like to download images asynchronously. How can I do using using ios5 and storyboards?

Thanks in advance


回答1:


I was having the very same problem, and what I did was take SDWebImage from https://github.com/rs/SDWebImage, open up the project on its own, and manually upgrade it to Objective C ARC (Refactor --> Convert to Objective C ARC).

When it was done being converted, I added it the individual files to my project and it works like a charm. I just

#import "UIImageView+WebCache.h"

and then in my - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath method, it loks like this:

[cell.videoImageView setImageWithURL:[NSURL URLWithString:thumbnailURLString]];

Simple!



来源:https://stackoverflow.com/questions/8993820/async-images-download-in-a-uitableview-using-storyboard-ios5

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!