Skip to content

Instantly share code, notes, and snippets.

@codecaffeine
Created April 8, 2013 00:35
Show Gist options
  • Save codecaffeine/5333319 to your computer and use it in GitHub Desktop.
Save codecaffeine/5333319 to your computer and use it in GitHub Desktop.
RACable(textView.text) vs. matchedTextView.rac_textSignal
@interface CAFMatchedTextViewController ()
@property (strong, nonatomic) IBOutlet UITextView *matchedTextView;
@end
@implementation CAFMatchedTextViewController {
- (void)viewDidLoad {
[super viewDidLoad];
[self.matchedTextView.rac_textSignal subscribeNext:^(NSString *string) {
NSLog(@"via rac_textSignal '%@'", string);
}];
[RACAble(self.matchedTextView.text) subscribeNext:^(NSString *string) {
NSLog(@"via RACAble '%@'", string);
}];
self.matchedTextView.text = @"asdf";
};
@end
2013-04-07 20:31:00.823 MyApp[96042:c07] via rac_textSignal ''
2013-04-07 20:31:00.829 MyApp[96042:c07] via RACAble 'asdf'
@codecaffeine
Copy link
Author

I assumed that these would both log 'asdf', but I wonder why rac_textSignal isn’t.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment