(也在GitHub 上向 ReactiveCocoa 人员开放评论。)
我正在一个非常简单的RACTest(源代码在 GitHub 上)应用程序中尝试 ReactiveCocoa,试图通过实际使用它来巩固我的理论理解。
我有一个RACChannel
,我想RAC()
,提供了一个ed l-value 和我指定为参数的任何东西之间的双向绑定RACChannel
。
我的用法如下:
// Map the ticker's accumulationEnabled property to self.paused.
RAC(self, paused) = [RACChannelTo(_ticker, accumulateEnabled) deliverOn:[RACScheduler mainThreadScheduler]];
我看到变化从一个方向流动,从_ticker.accumulateEnabled
to self.paused
,但变化 toself.paused
没有流回_ticker
。
我误解了RACChannel
吗?它有什么用,这不是预期的用途吗?