Loading image from CoreData at cellForRowAtIndexPath slows down scrolling

后端 未结 3 762
面向向阳花
面向向阳花 2020-12-01 07:08

I am working on a UITableView that is very much like the iOS\'s native Photo app: it has many rows with 4 image thumbnails in each row. (i.e. each UITableViewCell has 4 UIIm

3条回答
  •  温柔的废话
    2020-12-01 07:29

    I've used a class called JMImageCache to cache the image to disk and then only store the local URL (and remote URL if you like) in CoreData. You can also generate a thumbnail that you also save to disk and store the thumbnail URL along with the image URL in core data, and use the thumbnail in the table view.

提交回复
热议问题