Welcome to the Treehouse Community
Looking to learn something new?
Stuck on Quiz:Using a Custom Class
Create an instance of the Song class with the designated initializer initWithSinger:(NSString *)s and singer named "James Brown".
Song *popSong =
I have tried many times but still have no clue. Thanks
In this case it would be the same as
initing a class except you would use the
designated initializer instead and pass in the
// basic init Song *popSong = [[Song alloc] init]; // designated initializer Song *popSong = [[Song alloc] initWithSinger:@"James Brown"];
David Collins6,643 Points
I had this issue as well, it was driving me nuts.
This is what I had. Song *popSong = [[Song alloc]initWithSinger:@"James Brown"];
I kept getting marked as incorrect because there was no space after the first close square bracket.
Try song instead of Song.