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 Build a Diary App Using Core Data Listing Data using NSFetchedResultsController Section Headers and Table View Cells

Taha Lukmanji
Taha Lukmanji
619 Points

Problem such that Delegate method which reloads the table view is not running

I am having problems which seems like the Delegate method which reloads the table view is not running? Anyone can suggest what needs to be done. I have also assigned the view controller implementing the delegate as well. Can anyone suggest me any gotchas which I may have hit?

2 Answers

You've assigned both the datasource and delegate to the viewController using interface builder?

Try adding in your implementation file

self.yourTable.datasource =self;
self.yourTable.delegate =self;

Are any of the methods being called now?

Taha Lukmanji
Taha Lukmanji
619 Points

Hi Kerde, thanks for your help. Appreciate your quick response.

Actually I made a programming error where my NSFetchController instance was always staying at nil as I screwed up my code. My code essentially said if NSFetchController is not nil go and initialize the fetch controller which doesn't make sense. Taha

Okay, glad you got it working.