Skip to content

Instantly share code, notes, and snippets.

@jakemarsh
Created January 11, 2012 20:35
Show Gist options
  • Save jakemarsh/1596622 to your computer and use it in GitHub Desktop.
Save jakemarsh/1596622 to your computer and use it in GitHub Desktop.
Interview Question
There is no right answer, just want to get an idea how you would attack the problem.
You have a UITableView that displays images from a web service, you want to make sure it loads those images in a performant, memory conscious way, how would you do it?
@andyzaharia
Copy link

Yep, UIImageView+WebCache can do the job too :)

@ccjensen
Copy link

probably use NSOperation rather than libdispatch, as you want the ability to cancel an image download if that image scrolls off screen. Once the image has been downloaded, it would make sense to cache them/store them in an object so that if the user is scrolling up and down we don't have to re-download stuff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment