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 Blog Reader iPhone App Getting Data from the Web What is NSDictionary?

Marcus Davajon
Marcus Davajon
6,882 Points

NSDictionary 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
Pierre Thalamy
4,494 Points

As 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!

Marcus Davajon
Marcus Davajon
6,882 Points

This worked perfectly!! Thank you so much! You are what makes Treehouse so awesome :)

Pierre Thalamy
Pierre Thalamy
4,494 Points

You are very welcome Marcus! :-)

Pierre Thalamy
Pierre Thalamy
4,494 Points

What 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
Marcus Davajon
6,882 Points

The 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
Pierre Thalamy
4,494 Points

That'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
Marcus Davajon
6,882 Points

I 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!