I've been reading a lot of answers here saying that by using AlamofireImage helper methods (e.g. af_setImageWithURL()
) or any equivalent library, you don't need to worry about cell reusing stuff (Plus, many published tutorials actually just do that). That is to say, I don't have to keep a weak reference to the cell or getting it by using tableView's cellForRowAtIndexPath()
method to update its imageView after the background downloading finishes, like what we usually do if request made manually.
First of all, is that true? And if so, how it was done inside the library, cause I tried to trace AlamofireImage's af_setImageWithURL()
code, and I cannot find any effort made to make sure we're still working on the same cell we made the request from. Am I missing something?
I am sorry if it sounds stupid, but I am really confused.