@property (assign,nonatomic) int price;
@property (assign,nonatomic) int time;
[RACObserve(self,price) subscribNext:(id x){
}];
1.仅调用price的set方法时,才会触发rac观察,即self.price = 100触发,而_price = 100不会触发
2.sendNext传递的值,是price的get方法返回值
2024-02-07 11:18:23
@property (assign,nonatomic) int price;
@property (assign,nonatomic) int time;
[RACObserve(self,price) subscribNext:(id x){
}];
1.仅调用price的set方法时,才会触发rac观察,即self.price = 100触发,而_price = 100不会触发
2.sendNext传递的值,是price的get方法返回值