ReactKit是Swift的响应式编程。
示例代码:
// create signal via KVOself.obj1Signal = KVO.signal(obj1, "value")// bind signal via KVC (<~ as binding operator)(obj2, "value") <~ self.obj1SignalXCTAssertEqual(obj1.value, "initial")XCTAssertEqual(obj2.value, "initial")obj1.value = "REACT"XCTAssertEqual(obj1.value, "REACT")XCTAssertEqual(obj2.value, "REACT")
评论