Reputation: 3
How can I convert same method "rap_signalForControlEvents" to last working ReactiveCocoa Version?
I'm trying to build a example of the book Reactive programming with swift, but when I implemented the same method it doesn't work.
I've changed the reactiveCocoa version to the same of the book example but I think it's not updated for the new Swift Version.
Upvotes: -1
Views: 155
Reputation: 5941
I'm not sure how old the version you're using is, but at some point the library was split into two separate modules:
So first make sure you have both of those libraries in your project. Then you can create a control event signal like this:
cell.addButton.reactive.controlEvents(.touchUpInside)
.observeValues { _ in
// Handle the button press here
}
Upvotes: 1