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 trialDwight Davis
Courses Plus Student 9,120 PointsI found two mistakes in the project that I would love to know how to fix it :-)
- When I delete the last entry, there in a visual problem with the lines
- The mood image doesn't get set
Thank you :-)
3 Answers
Stone Preston
42,016 Pointsthere 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
2,242 PointsSame 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
4,341 PointsI 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