I have a UI Table View Controller. Each Cell Loads an image from my webserver. If I scroll the TableView so that a particular cell scrolls out of view and then scroll back again the image for that cell has vanished and I have to wait for it to reload.
I'm guessing this is some performance/ memory management thing build into iphone?
How can I stop this behaviour?
I believe the cells in the tableview are recycled.
cache the images in memory and assign from your cache rather than loading the images directly into the tableview
I don't know if this is best practice or not but I think you could use an
NSArray
orNSDictionary
ofUIImage
and load into there first and just assign references to the objects in the array.Update
There is some code here which uses an
NSMutableDictionary
for the cache