On 04.09.2012, at 07:52, Graham Cox wrote:
On 04/09/2012, at 3:24 PM, Gerriet M. Denkmann gerr...@mdenkmann.de wrote:
I have a class with a mutable array. But from outside it should be just a
read-only non-mutable array.
Is there a better (more elegant) way?
Just return the internal
I have a class with a mutable array. But from outside it should be just a
read-only non-mutable array.
My current solution:
MyClass.h file contains:
@property (readonly, nonatomic) NSArray *externalArray;
and MyClass.m file has:
@interface MyClass()
@property (strong) NSMutableArray
On Sep 3, 2012, at 10:24 PM, Gerriet M. Denkmann gerr...@mdenkmann.de wrote:
I have a class with a mutable array. But from outside it should be just a
read-only non-mutable array.
My current solution:
MyClass.h file contains:
@property (readonly, nonatomic) NSArray *externalArray;
On 04/09/2012, at 3:24 PM, Gerriet M. Denkmann gerr...@mdenkmann.de wrote:
I have a class with a mutable array. But from outside it should be just a
read-only non-mutable array.
[]
Is there a better (more elegant) way?
Just return the internal (mutable) array as an NSArray. By typing it