iphone - What's the best way to use Obj-C 2.0 Properties with mutable objects, such as NSMutableArray? -
I have an OBJ-C 2.0 class in which NSMutableArray is property if I use the following code, then the synthetic setter Will give an irreversible copy which is not ineligible:
@property (text, copy) NSMutableArray * myArray; Does the applet have implemented the following syntax?
@property (legate, mutecopy) NSMutableArray * myArray; We do not have mutablecopy , so what is the best way to handle this (seemingly normal) situation? Should I just write my own setter which is an important copyright?
As told before, correctly to do this Unstable array is not meant to make a property, it is a great description of what you should implement to be in line with KVC.
Comments
Post a Comment