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 trialMarcus Davajon
6,882 PointsNSDictionary is not pulling the subtitle.
I have no errors when running the app and when running it only show the @"title" and not the @"author". I have watched the video 4 times and Have followed all the steps.
cell.textLabel.text = [blogPost valueForKeyPath:@"title"];
cell.detailTextLabel.text = [blogPost valueForKeyPath:@"author"];
Also, the storyboard is labeled correctly at sublist and it reflects the style. It just doesn't reflect it when the app is ran.
Thank you for your help!!
3 Answers
Pierre Thalamy
4,494 PointsAs crazy as this may sound, it works on my computer without changing a thing!
Perhaps the simulator is the source of the issue. Try restarting xcode and the simulator, then reset it as shown on this screenshot, and tell me if it was of any help!
Pierre Thalamy
4,494 PointsWhat is the output you get in the console when adding the following line:
cell.textLabel.text = [blogPost valueForKeyPath:@"title"];
cell.detailTextLabel.text = [blogPost valueForKeyPath:@"author"];
NSLog(@"%@", [blogPost valueForKeyPath:@"author"]);
Marcus Davajon
6,882 PointsThe out put is the name of the authors:
2014-08-06 11:47:55.053 BlogReader[2951:60b] Ben Jakuben
2014-08-06 11:47:55.055 BlogReader[2951:60b] Amit Bijlani
2014-08-06 11:47:55.057 BlogReader[2951:60b] Joe Novo
Pierre Thalamy
4,494 PointsThat's weird, as it is the expected output.
Also, the storyboard is labeled correctly at sublist and it reflects the style. Do you mean Subtitle, as on this screenshot?
If it was not the issue, could you upload your project to Github or Dropbox, so I can play around with it for a bit and see what's wrong?
Marcus Davajon
6,882 PointsI really appreciate your help! I did mean subtitle and it is labeled correctly (as far as I can tell).
I just installed dropbox.
https://www.dropbox.com/l/0nIJPblThDIgflCHfP3KFr
Let me know you need any additional info!
Marcus Davajon
6,882 PointsMarcus Davajon
6,882 PointsThis worked perfectly!! Thank you so much! You are what makes Treehouse so awesome :)
Pierre Thalamy
4,494 PointsPierre Thalamy
4,494 PointsYou are very welcome Marcus! :-)