Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

why RACObserve(self.scoreStepper,value) not available? #3700

Closed
Dast1Woop opened this issue Feb 6, 2020 · 1 comment
Closed

why RACObserve(self.scoreStepper,value) not available? #3700

Dast1Woop opened this issue Feb 6, 2020 · 1 comment

Comments

@Dast1Woop
Copy link

Dast1Woop commented Feb 6, 2020

I have the code:
@property(weak) IBOutlet UIStepper *scoreStepper; [[[RACObserve(self.scoreStepper,value) skip:1] take:self.viewModel.maxPointUpdates] subscribeNext:^(id newPoints) { @strongify(self); self.viewModel.points = [newPoints doubleValue]; self.scoreUpdates++; }];
but the code of subscribe cannot be excute.
when I change the code like this:
[[[self.scoreStepper rac_signalForControlEvents:UIControlEventTouchUpInside] take:10] subscribeNext:^(UIStepper * x) { @strongify(self); NSLog(@"value:%f",x.value); self.viewModel.points = x.value; self.scoreUpdates++; }];
it works!
So,I wonder why "RACObserve(self.scoreStepper,value) subscribeNext ..."cannot work?

@ikesyo
Copy link
Member

ikesyo commented Feb 7, 2020

Please open an issue on https://github.com/ReactiveCocoa/ReactiveObjC for the the Objective-C ReactiveCocoa.

@ikesyo ikesyo closed this as completed Feb 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants