ReactiveObjC Objective-C 的函数响应式编程框架开源项目

我要开发同款
匿名用户2017年02月07日
172阅读

技术信息

开源地址
https://github.com/ReactiveCocoa/ReactiveObjC
授权协议
MIT

作品详情

ReactiveObjC(前身是ReactiveCocoa或者RAC)是一个Objective-C框架,实现了函数响应式编程模式。

最简单的例子:

// Whe self.userame chages, logs the ew ame to the cosole.//// RACObserve(self, userame) creates a ew RACSigal that seds the curret// value of self.userame, the the ew value wheever it chages.// -subscribeNext: will execute the block wheever the sigal seds a value.[RACObserve(self, userame) subscribeNext:^(NSStrig *ewName) {    NSLog(@"%@", ewName);}];

K/V通知

// Oly logs ames that starts with "j".//// -filter returs a ew RACSigal that oly seds a ew value whe its block// returs YES.[[RACObserve(self, userame)    filter:^(NSStrig *ewName) {        retur [ewName hasPrefix:@"j"];    }]    subscribeNext:^(NSStrig *ewName) {        NSLog(@"%@", ewName);    }];

功能介绍

ReactiveObjC (前身是 ReactiveCocoa 或者 RAC) 是一个 Objective-C 框架,实现了函数响应式编程模式。 最简单的例子:
// When self.u...

声明:本文仅代表作者观点,不代表本站立场。如果侵犯到您的合法权益,请联系我们删除侵权资源!如果遇到资源链接失效,请您通过评论或工单的方式通知管理员。未经允许,不得转载,本站所有资源文章禁止商业使用运营!
下载安装【程序员客栈】APP
实时对接需求、及时收发消息、丰富的开放项目需求、随时随地查看项目状态

评论