Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.


Extra credit crystal ball

I'm really confused. The extra credit is to make the CrystalBall method work without the @property. I just erased the @property and it still works. Is it me or is this just to simple to be good.

2 Answers

//  TGCrystalBall.h
//  CrystalBall
//  Created by Tristan Gaebler on 9/2/14.
//  Copyright (c) 2014 TristanGaebler. All rights reserved.

#import <Foundation/Foundation.h>

@interface TGCrystalBall : NSObject {
    NSArray *_predictions;
//This is where the @property was
-(NSString *) randomPrediction;

Yep. You just replace the "predictions" property with the _predictions ivar and that's it!


Without which @property?

I think it was the @property (strong, nonatomic) NSArray *predictions;

Could you paste a code sample to show what you have?