NSArray @property backed by a NSMutableArray
I've defined a class where I'd like a public property to appear as though it is backed by an NSArray . That is simple enough, but in my case the actual backing ivar is an NSMutableArray : @interface Foo { NSMutableArray* array; } @property (nonatomic, retain) NSArray* array; @end In my implementation file ( *.m ) I @synthesize the property but I immediately run into warnings because using self.words is the same as trying to modifying an NSArray . What is the correct way to do this? Thanks! I would declare a readonly NSArray in your header and override the getter for that array to return a copy