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

ios- 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

This is the line you need for the second part '''@synthesize songTitle = title;'''

Amit Bijlani
STAFF
Amit Bijlani
Treehouse Guest Teacher

The 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.

It somehow doesn't work for me.