0

I've tried removing cache, clean all targets, etc. Instance variables from my super class are getting highlighted green according to my color scheme, but the compiler then fails saying

"score" (or whatever) undeclared"

If I have two references in one method, only the first one fails. If I leave them out, or use instance variables from my subclasses header, the app compiles and runs fine.

It was working literally just 2 days ago. I wonder if I accidentally hit a shortcut that turned on some weird setting?

It's running in the 3.2 iPad simulator, if that matters.

It's a weird one.. hope someone has run into this before.

1 Answer 1

1

Sounds like your instance variables are declared as @private. This means that only that exact class can access them. If you want subclasses to access the ivars directly put @protected above them, eg

@protected
id myiVar;
NSString *myStringIVar;
Sign up to request clarification or add additional context in comments.

1 Comment

Good idea. Wasn't the case though. Copying the project gave same issue, but copying the code worked.. I'll just chalk this up to "Xcode weirdness"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.