first time load the image position is not right. Some of the image got wrong position
after scrolling, some image position is messed up too
I’ve searched a lot place and found out this is some reuse cell issue. and one of the solution is to clean the old cell inside prepareForReuse func.(but seems this totally abandan reuse cell feature? and might be slow for large amount of data?)
Is there any way to handle reuse cell issue properly with large amount of data. for example 20000 locally image loading?
I believe what you need to be doing is caching the images as you scroll. The reason for this is so that you are not retrieving these images repeatedly, thus minimizing the network calls, and consequently, the data consumption. You also improve performance in doing so. As the images are retrieved, store them locally using NSCache, and this way, prior to retrieving the images from the network, check to see if the image is already stored locally. If the image exists, then simply retrieve it from local storage. If it doesn’t exist, then and only then retrieve the image from the network, and then store it locally right away for later reuse. I believe this will solve your issue.