Skip to content

Instantly share code, notes, and snippets.

@bricklife
Created July 15, 2015 16:10
Show Gist options
  • Save bricklife/acaeed45029681c8c907 to your computer and use it in GitHub Desktop.
Save bricklife/acaeed45029681c8c907 to your computer and use it in GitHub Desktop.
RAC macro
RAC(self, text) = self.textField.rac_textSignal;
=>
RACSubscriptingAssignmentTrampoline *trampoline = [[RACSubscriptingAssignmentTrampoline alloc] initWithTarget:self nilValue:nil];
trampoline[@keypath(self, text)] = self.textField.rac_textSignal;
=>
[self.textField.rac_textSignal setKeyPath:@keypath(self, text) onObject:self nilValue:nil];
https://github.com/ReactiveCocoa/ReactiveCocoa/blob/master/ReactiveCocoa/RACSubscriptingAssignmentTrampoline.h
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment