UITableView Lazy Image Load, images appear after table STOPS scrolling

前端 未结 2 818
一个人的身影
一个人的身影 2021-02-06 08:47

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 s

相关标签:
2条回答
  • 2021-02-06 09:15

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

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

    Thanks for the answers!

    0 讨论(0)
  • 2021-02-06 09:17

    Take a look at the Apple example LazyTableImages.

    If you request all the images for your table asynchronously, they will load as they arrive.

    You'll notice some applications wait for scrollViewDidEndDragging and loadImagesForOnscreenRows to be truly lazy and only request images for rows the user is currently examining.

    0 讨论(0)
提交回复
热议问题