RAC 知识点(三)
来源:互联网 发布:高考复读知乎 编辑:程序博客网 时间:2024/06/16 00:13
#import "NSObject+RACSelectorSignal.h"
导入这个头文件所有继承于NSObject的类都可以调取这个方法
/// Creates a signal associated with the receiver, which will send a tuple of the
/// method's arguments each time the given selector is invoked.
这个信号将会发送这个方法参数
a tuple of the method's arguments 方法的参数
each time the given selector is invoked 每次方法被调用的时候///
/// If the selector is already implemented on the receiver, the existing
/// implementation will be invoked _before_ the signal fires.
如果这个方法在接受者的类里已经实现了,那么存在的实现会在信号触发之前调用
///
/// If the selector is not yet implemented on the receiver, the injected
/// implementation will have a `void` return type and accept only object
/// arguments. Invoking the added implementation with non-object values, or
/// expecting a return value, will result in undefined behavior.
如果这个方法在接受者的类里没有实现,注入的实现会有一个 void的返回类型 和只能接受对象参数;
用非对象的值调用已添加的实现或者期望获得一个返回值将会导致没有定义的行为
///
/// This is useful for changing an event or delegate callback into a signal.
/// For example, on an NSView:
///
/// [[view rac_signalForSelector:@selector(mouseDown:)] subscribeNext:^(RACTuple *args) {
/// NSEvent *event = args.first;
/// NSLog(@"mouse button pressed: %@", event);
/// }];
///
/// selector - The selector for whose invocations are to be observed.
这个方法的调用要被观察
If it doesn't exist, it will be implemented to accept object arguments and return void.
This cannot have C arrays or unions as arguments or C arrays, unions, structs, complex or vector types as return type.
///
/// Returns a signal which will send a tuple of arguments upon each invocation of the selector,
// then completes when the receiver is deallocated.
// `next` events will be sent synchronously from the thread that invoked the method.
// If a runtime call fails, the signal will send an error in the RACSelectorSignalErrorDomain.
- (RACSignal *)rac_signalForSelector:(SEL)selector;
- RAC 知识点(三)
- RAC 知识点(二)
- RAC 知识点
- RAC 11.2 体系结构(三)
- RAC 知识点整理
- 知识点积累(三)
- TextField 知识点(三)
- Pandas知识点(三)
- MYSQL知识点(三)
- mybatis知识点(三)
- RAC数据库建立STANDBY(三)
- 11G RAC 虚拟机安装(三)
- linux下Oracle11g RAC搭建(三)
- QT 知识点总结(三)
- Launcher知识点整理(三)
- 数学知识点回顾(三)
- java知识点回顾(三)
- C++知识点总结(三)
- 自动轮播图简单实现
- collider 碰撞检测
- javascript基础笔记(十二)之js的Date对象
- 微信公众号平台开发(三):几大微信接口的调用
- Log4j按级别输出日志到不同文件配置分析
- RAC 知识点(三)
- pthread_create()函数传递整型参数问题
- android数据存储的再学习
- opencv与visual studio 版本关系
- PHP中的变量详解
- 欢迎使用CSDN-markdown编辑器
- To do list
- MySQL索引背后的数据结构及算法原理
- codevs 1021 玛丽卡(spfa)