I’m sorry for the little confusing title but say I have a class with an interface that looks like this:
@interface Class : NSObject {
NSArray *items;
}
@property (nonatomic, retain) NSArray *items;
@end
In the impementation I actually want to do some adding operations thus using NSMutableArray and then the user using the class should be able to retrieve the data as an NSArray.
Declare mutable array as instance variable, declare the property as readonly NSArray and overwrite the getter.