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 Data Modeling Designated Initializers and Convenience Constructors

Kyle V
Kyle V
781 Points

Question on Quiz

I tried to fill in the blanks on this quiz and it keeps giving me errors... What is wrong here?

Fill in the convenience constructor below for the class Song, which calls a designated initializer named: initWithSinger: (NSString*) singer

  • ( id ) ____________ : (NSString*) singer {return [[ ________ alloc] initWithSinger: _________];}

I tried these... initWithSinger, self, singer

1 Answer

Amit Bijlani
STAFF
Amit Bijlani
Treehouse Guest Teacher

A convenience constructor starts with the name of the class which in this case is Song. So your answer would be songWithSinger.

Kyle V
Kyle V
781 Points

Thanks for you help! I appreciate the support on Treehouse :)