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

Challenge task 1 of 3 We continue building our random quotes app. We want to separate out our data from the view contro

//.h @interface Quote : NSObject

// Add property here

  • (NSString *) randomQuote; @property(nonatomic,strong)NSArray * quotes; //I added , but not right



import "Quote.h"

@implementation Quote

  • (NSString *) randomQuote {

    return @"Some Quote"; }


1 Answer

Stone Preston
Stone Preston
42,016 Points

refresh the page and try again. I tried using your code in the .h and passed task 1

@interface Quote : NSObject

// Add property here

- (NSString *) randomQuote;
@property(nonatomic,strong)NSArray * quotes;


although generally you put a space after the property attributes, and most people ive seen put the asterix right before the variable name

@property(nonatomic,strong) NSArray *quotes;