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

Keith Forsythe
Keith Forsythe
6,316 Points

Blog Reader App (iOS7)

I'm working through the blog reader app in Xcode 5 and I noticed the author subtitles are not displaying. When I run the application it compiles and runs fine - just no subtitles. Is this a change in iOS 7 or do I suck? Here is the code I am using;

cell.textLabel.text = [blogPost valueForKey:@"title"];
cell.detailTextLabel.text = [blogPost valueForKey:@"author"];

3 Answers

Amit Bijlani
STAFF
Amit Bijlani
Treehouse Guest Teacher

Check the style of the table view cell in the storyboard. It should say "Subtitle".

Keith Forsythe
Keith Forsythe
6,316 Points

Yep, that was the problem. Thanks for the help and thanks for the great teaching!

Hello, I am having a problem with this code. I have the exact same code as Keith shows above (and also as shown in the video), but I am getting the error "Assignment to readonly property" on the detailTextLabel line. I have changed the table view cell in the storyboard to "Subtitle" as well.

The program compiles and runs fine with only the textLabel line, but the addition of the detailTextLabel line seems to break it.

I can't seem to figure it out.....any help would be appreciated!

Update ---> I rewatched the video and started over, realized the code wasn't exact after all. Was missing the .text statement after detailTextLabel.