I've created an event subscriber in viewDidLoad, as follows:
[RACObserve(_authenticationView.passwordInput.textField, text) subscribeNext:^(NSString* text)
{
//handle this
}];
This fires whenever the textField.text property changes (expected), however it also fires once when created, or for the intitial value, which is not what I want.
Of course I could filter this out, but I only want to filter the first event out. How do I do this?
Requirements:
- If the password has a new empty value, present a validation message (can't proceed password empty).
- If the password has a new non-empty value, talk to remote client.
. . so what's the cleanest way to do this?
rac_textSignal
method that may be more reliable than observingtext
, sinceUITextField
s aren't guaranteed to be KVO compliant for that key (as far as I understand). – Tampa