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 trialRyan Cocuzzo
1,206 PointsCode returning incorrect, anybody got any ideas?
self.quotes = [[NSArray alloc] initWithObjects:
@"Haters gonna hate", @"Life is simple, not easy",
@"Winners never quit, quitters never win", nil];
2 Answers
Aymeric Gallissot
7,726 PointsThe response for your problem:
self.quotes = [[NSArray alloc] initWithArray:@[@"Haters gonna hate", @"Life is simple, not easy", @"Winners never quit, quitters never win"]];
Aymeric Gallissot
7,726 PointsYou can do just like this
self.quotes = @[@"Haters gonna hate" @"Life is simple, not easy", @"Winners never quit, quitters never win"];
Ryan Cocuzzo
1,206 PointsThis did code did not work, do you have other suggestions?
Ryan Cocuzzo
1,206 PointsRyan Cocuzzo
1,206 PointsI tried that exact code and it did not work
Aymeric Gallissot
7,726 PointsAymeric Gallissot
7,726 PointsI tried the exercise and it works for me. Check the console error message.