UITableView Lazy Image Load,图像出现在STOPS表滚动之后 [英] UITableView Lazy Image Load, images appear after table STOPS scrolling

查看:90
本文介绍了UITableView Lazy Image Load,图像出现在STOPS表滚动之后的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用NSUrlConnection为我的UITableView实现了延迟图像加载。这一切都很好。当我打开桌子时,我会在等待一秒钟时自动获取图像(在3G上)。但是,当我滚动时,表加载新单元格,启动NSURLConnections,但是当图像加载完成(在代码中)时,它们不会被放入视图,直到表实际停止滚动..

I implemented lazy image load for my UITableView using NSUrlConnection. This is all working very nicely. When I open my table, I automatically get the images when I wait for a second (on 3G). However, when I scroll, the table loads the new cell's, starts the NSURLConnections, but when the image is finished loading (in code), they do not get put into the view until the table actually stops scrolling..

Youtube应用程序能够将图像加载到表格中滚动,我也想这样做,任何提示/指针?

The Youtube application is able to load the images into the table WHILE scrolling, I'd like to do this as well, any hints / pointers?

推荐答案

我刚刚找到答案,感谢右侧的相关功能.. 在UITableView中延迟UIImageView渲染

I just found my answer thanks to the 'Related' feature to the right.. Delayed UIImageView Rendering in UITableView

你必须在不同的运行循环中启动NSUrlConnection,以便你收到表滚动时的数据。

You have to start NSUrlConnection in a different run-loop, so that you receive data while the table is scrolling.

感谢您的回答!

这篇关于UITableView Lazy Image Load,图像出现在STOPS表滚动之后的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆