You can't use RAC()
directly on a UIButton because of the UIKit design:
RAC(self.button.titleLabel, text) = titleSignal; // Don't do this.
One of the solutions is using dynamic property to support RAC()
binding macro:
// .h
- (void)viewDidLoad
{
[super viewDidLoad];
@weakify(self);
// Add a gesture recognizer to a view
UITapGestureRecognizer *tap = [UITapGestureRecognizer new];
[tap.rac_gestureSignal subscribeNext:^(id x) {
@strongify(self);