ios - Two objects that points to one -
i have methode :
-(void)mymethod:(myclass *)object { self.object1 = object; self.object2 = object; .... }
and object1
, object2
declared :
property (nonatomic, strong) myclass *object1; property (nonatomic, strong) myclass *object2;
and myclass :
@interface myclass :nsobject .... @end
and later when modify self.object1
self.object2
modified to, self.object2
don't change value when modifing self.object1
you need make 2 properties copy
instead of sttrong
. need make myclass
conform nscopying
protocol , must implement copywithzone:
method.
Comments
Post a Comment