Please note, this blog entry is from a previous course. You might want to check out the current one.
Add a photo’s thumbnail image (FlickrFetcherPhotoFormatSquare) to every row in any table view that shows a list of photos. Don’t ask Flickr for the image data of thumbnails that never appear on screen (i.e. fetch thumbnail image data only on demand). There’s no need to cache these images (they are very small). Obviously when a row first appears, it will not have the thumbnail image, but, sometime later, when the thumbnail data comes back from Flickr (and if the row is still on screen), it should appear. Beware Required Task #1. And consider the hint above about not calling UI methods from outside the main thread and also remember that table view cells are reused as the scroll on and off screen.
Basically the procedure is the same as for the annotation views. Check if the table item is photo, download its photo asynchronously and put it on screen back in the main queue. The only difference is that it is necessary to put an placeholder image into the cell otherwise it is not possible to update the image once it has been loaded:
Continue reading “Assignment #5 Extra Task #1”