Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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