views:

30

answers:

0

What's a decent way to load UIImages on demand without blocking the main thread?

Context: I have a couple thousand images on a wall that I can scroll through. Obviously it's not feasible to just load all the UIImages, so right now I'm just lazy loading the ones that are getting displayed, and then releasing them when they're no longer needed. The problem is that loading UIImages from files takes a noticeable bit of time, just long enough to cause stuttering while scrolling. These are by no means large images (around 250x250, maybe 20-30kb each), but they still cause stuttering.