1. RAC action: Used to bind a signal to an attribute of an object, as long as the signal content is generated to assign the content to the property value RAC (_label, text) = _textfield.rac_textsignal; 2.RACObserver (self, name): Whenever the property of this object changes, it generates a signal [Racobserve (Self.view, frame) subscribenext:^ (id x) { NSLog (@ "changed"); }]; 3. @weak (OBJC) and @strong (OBJC) Role: Resolve each other strong references//not add @ will error
Weak pointers
@weakify (self);
Racsignal *signal = [racsignal createsignal:^racdisposable * (id<racsubscriber> subscriber) {
@strongify (self);
return nil; }]; 4.RACTuplePack: Wrapping data into ractuple (tuple class) Ractuple *tuple = Ractuplepack (@1, @2); NSLog (@ "tuple[0] =%@", tuple[0]); 5.RACTupleUnpack: ractuple (Tuple Class) is unpacked into corresponding data//the data in the parameters are packaged into tuples ractuple *tuple = Ractuplepack (@ "XMG", @20); Jiu Baoyuan Group, the value of the tuple, in order to assign a value to the variable inside the parameter//name = @ "XMG" age = @20 ractupleunpack (nsstring *name,nsnumber *age) = tuple;
Common Macros for RAC