Asynchronous Image loading in certain custom UITableViewCells
- by Dan
So, I'm sure that this issue has been brought up before, but I haven't quite seen a solution for my specific problem. What I'm doing is loading a group of custom UITableViewCell's that are drawn using Loren Brichter's solution, each cell has some content, an icon (representing the user) that is asynchronously loaded into it, and a few other things.
Eventually, I'm hoping to add support for images. Not every cell has an image, so in the creation of the cell, it determines if an image is required to be loaded and drawn into the cell.
My problem is that I don't know how I can do that while keeping the image loaded asynchronously - with not every cell having the need to load an image (like needed with the icon) I'm not sure how to keep it in order when an cell is thrown off screen and re-rendered when the user scrolls over it. Each cell draws it content from an NSArray containing a custom object called FeedItem.
All I'm really looking for is some sort of solution or idea to help me because right now I am at a loss.
Thanks guys, I will appreciate the help.