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 Using a Custom Class

Jordan Fowler
Jordan Fowler
3,821 Points

Convenience constructors don't work...

I've tried every combination that could possibly be correct here and none of them work.

2 Answers

Stone Preston
Stone Preston
42,016 Points

if you are referring to the songWithSinger convenience constructor remember that convenience constructors are Class methods, not instance methods, so they look like

[Classname convenienceConstructorWithObject:object];

try

[Song songWithSinger:@"James Brown"];
Jordan Fowler
Jordan Fowler
3,821 Points

I figured out the issue from another Forum post. It turns out if you have spaces in your code, such as between the ":@" it says the answer is wrong, but it is actually correct. The reason it is a correct answer is: the syntax is still valid.