I have a very simple use case for ReactiveCocoa
. In my setup, I have two UITextField
s and one UIButton
.
The button's enabled
property should only be set to true
iff both textfields contain at least one character.
I started out creating a Signal<Bool, NoError>
that emits true
or false
depending on the the above mentioned condition.
Now, as far as I understand I somehow need to bind the signal (or its values) to the enabled
property of my button. But I have no clue how to do this and more than an hour of research haven't lead to any results...
UPDATE:
From what I understand, this could previously be achieved using the RAC
macro: RAC(self.button, enabled) = signal;
, or something along those lines. But that doesn't help me since the macros have been deprecated in RAC 3. My question is basically the same as this one only for RAC 4 instead of 3.