我有这样的方法:
-(void)myMethod:(MyClass *)object {
self.object1 = object;
self.object2 = object;
....
}
并且object1
声明object2
如下:
property (nonatomic, strong) MyClass *object1;
property (nonatomic, strong) MyClass *object2;
MyClass 是这样的:
@interface MyClass :NSObject
....
@end
后来当我修改被修改为时,我希望self.object1
在修改时不要改变它的值self.object2
self.object2
self.object1