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
J V
1,774 Pointsios- Creating a Custom Class - Part 2
I had every part of the quiz currect except this. Anyone can provide tips to help me fill in the blanks.
Fill in the missing class declaration:
//********************* // Header Song.h @interface Song : NSObject { NSString *title; }
@property (nonatomic,strong) NSString *songTitle;
@end
//********************* // Implementation Song.m
import "???????"
@implementation Song
@synthesize ???? = ?????;
@end
2 Answers
Chris Howie
13,216 PointsThis is the line you need for the second part '''@synthesize songTitle = title;'''
Amit Bijlani
Treehouse Guest TeacherThe first part of the code declares the header. And the header his called "Song.h" which you have to import in the second part of the code. Then you have the @synthesize statement where you have to synthesize the property named songTitle.
Anthony Ho
10,228 PointsIt somehow doesn't work for me.