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 Custom Detail View Controller Using Core Location

Dwight Davis
PLUS
Dwight Davis
Courses Plus Student 9,120 Points

I found two mistakes in the project that I would love to know how to fix it :-)

  1. When I delete the last entry, there in a visual problem with the lines
  2. The mood image doesn't get set

Thank you :-)

3 Answers

Stone Preston
Stone Preston
42,016 Points

there appears to be a bug with the animation when deleting the last row in a tableView. its a bug with iOS itself. you can open up your clock app on your phone and delete the last row and see that the animation messes up there as well. so its not something you did wrong in your app.

Eric M
Eric M
2,242 Points

Same issue with the mood image. I think there's a missing part where you use the enum to select which image to use. Maybe @dwight and I both missed the same part, but unlikely.

Daniel Benito
Daniel Benito
4,341 Points

I found the solution for the mood image not displaying properly:

On the insertDiaryEntry method of the THEntryViewController.m implementation file, you have to save the mood (I believe this was not included during the course or maybe I skipped it by accident), otherwise it won't be recorded accordingly. So the last three lines of that method should look like:

-(void)insertDiaryEntry
{
    ...
    entry.location = self.location;
    entry.mood = self.pickedMood;
    [coreDataStack saveContext];
}

Do the same for the updateDiaryEntry:

-(void)updateDiaryEntry
{
    self.entry.body = self.textView.text;
    self.entry.mood = self.pickedMood;
    ...
}

That worked for me