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 Simple iPhone App (iOS7) Refactoring into a Model Creating a Custom Class

Nicolas Acosta
Nicolas Acosta
1,587 Points

Cant solve task #2, Creating a Custom Class, Refactoring a Model, Build a Simple iPhone App, iOS Development.

I need help to solve this task please.

Link to the challenge: http://teamtreehouse.com/library/creating-a-custom-class

Link to my challenge screenshot: https://www.dropbox.com/s/w6qltsmejvxzg1d/Captura%20de%20pantalla%202014-07-29%2003.03.51.png

Thank you very much.

1 Answer

Nick Sint
Nick Sint
4,208 Points

It appears you made a small mistake! Very small!

The task states to create a method called 'quotes'. You named your method 'predictions' for some reason.

The required code should there be

-(NSArray *) quotes{
if (_quotes == nil){
     _quotes = [[NSArray alloc] initWithObjects:@"1",@"2",@"3", nil];
}
return _quotes;
}
Nicolas Acosta
Nicolas Acosta
1,587 Points

Thank you very much!!!!

I don't know why, but I confused with the Tutorials, which had a CrytalBall for predictions as the example.