Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS

Kieran Robinson
Kieran Robinson
9,411 Points

Caching core data stored images?

Hi! I have a UITableView in which each cell contains an image (saved in coreData) . However as i scroll through the table it is evident that the images are loaded from core data every time they are scrolled to, making my app slow and unresponsive. Does anyone know how to cache and only load said images when they're needed? Thanks! Kieran

Amit Bijlani, Ash Furrow, Ben Jakuben, Stone Preston

2 Answers

Kieran Robinson
Kieran Robinson
9,411 Points

Thank you for that Amit Bijlani! To practice i am trailing this on the core data diary app with Ash Furrow, however I'm not too sure where i should create the cache and also how to do it as the one in the video is using NSUrlSession's to download images whereas this uses core data! Kieran