0

Apologies about the title of this question; it is always hard to sum up these things into a few words.

I've noticed in Xcode 5 that if I create a @property as readonly I get compiler errors on my references to the instance variable in my code. For example :

@property (nonatomic, readonly) UIView *aView;

Then in my implementation somewhere :

self.anotherView = _aView; // blah blah

The instance variable is automatically created for me (I thought), so why do I get unknown type errors for readonly properties? I'm sure it didn't do this before.

Lee Probert
  • 10,308
  • 8
  • 43
  • 70

1 Answers1

0

I haven't noticed any difference in Xcode 4 and Xcode 5 regarding properties semantics.

Is it possible that that you defined an accessor aView somewhere, leading Xcode to believe that there is no need for an instance variable?

ilya n.
  • 18,398
  • 15
  • 71
  • 89
  • No. Nothing out of the ordinary. To be honest I am spotting weird behaviour in general from Xcode 5 - compiler errors show up but it still builds etc; but the above issue is preventing a build. I'm hoping a patch will fix this. – Lee Probert Oct 07 '13 at 08:16