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

Moving cellForRowAtIndexPath to configureCellForEntry

I've worked through Ash Furrow's core data lesson and it's been incredibly helpful. I have one lingering question: why have we moved the cell configuration calls that we'd "normally" see in cellForRowAtIndexPath: to another method in our custom cell class?

My question is stemming from trying to cache the images for use in the cells, as my tableView scrolls very slowly. Again, "normally", scrolling performance when caused by images is solved by caching images in cellForRowAtIndexPath. I have also tried other suggestions like setting setFetchBatchSize to some low number like 20, and tried to create thumbnail images so my app isn't loading large images each time a cell is created. Any help would be much appreciated. Thanks in advance!

2 Answers

does configureCellForEntry end up getting called inside cellForRowAtIndexPath? if so its probably just for organization purposes. Sometimes it helps to separate a method into logical parts, that way you dont end up with a method with a bunch of code inside that does a lot of different stuff

It does. Thanks..