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

"local declaration of 'predictionArray' hide instance variable"

The problem happens when I'm in Xcode, I did just like what the instructor taught, then suddenly it appears yellow line and side by side of the code:

self.predictionLabel.text = [predictionArray objectAtIndex:5];

I'm in this lesson: http://teamtreehouse.com/library/ios-development/build-an-iphone-crystal-ball-app/learning-the-language/creating-a-property

someone can explain this to me. im in Xcode iOS 6.

Thanks, Amin

2 Answers

Amit Bijlani
STAFF
Amit Bijlani
Treehouse Guest Teacher

It's possible that you are declaring the predictionArray within that method. You need to remove that declaration since you have created a property within the header file. And since you have created a property you should refer to it with self.predictionArray

Hi Mr Amit Thanks for responding, I did what'd you told me, yeah it works. Thanks. :D