码迷,mamicode.com
首页 > 其他好文 > 详细

对Property进行RACObserve

时间:2015-10-21 22:35:47      阅读:234      评论:0      收藏:0      [点我收藏+]

标签:

@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方法返回值

对Property进行RACObserve

标签:

原文地址:http://www.cnblogs.com/guoxiaoqian/p/4899252.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!