You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
rx_value in extension UIControl (RxCocoa.UIControl+Rx.swift) shouldn't call .distinctUntilChanged() since it manipulates the native event behavior of a UIControl. Imho it should be up to the developer to call .distinctUntilChanged() or not.
E.g. the developer wants to limit the character input within a UITextField, .distinctUntilChanged() will prevent the developer from manipulating the input from every second event if the second content is equal to the previous content because the second event won't be dispatched at all.
textField.rx_text
.map { text in
text = [remove special characters from 'text' and assign the result to 'text' again]
return text
}
.bindTo(textField.rx_text)
.addDisposableTo(disposeBag)
The text was updated successfully, but these errors were encountered:
What a sense for timing :) You are correct. I've encountered similar issues yesterday, and already removed all distinctUntilChanged. I've pushed my changes to develop branch :)
I've just encountered a similar problem about UISwitch.rx_value.
I tried to call an uialertview with an inputTextField when UISwitch.rx_value is changing, in order to confirm this user has correct password for this operation.
if not, I'll change mySwitch.on to original setting programmatically.
However, uialertview didn't appear next time because distinctUntilChanged have blocked it.
I even tried to emit a new rx_value signal to reseting the previous rx_value, but I can't send any rx_value signal programmatically.
I think the solution of this issue will solve my problem as well. thank you all.
rx_value in extension UIControl (RxCocoa.UIControl+Rx.swift) shouldn't call .distinctUntilChanged() since it manipulates the native event behavior of a UIControl. Imho it should be up to the developer to call .distinctUntilChanged() or not.
E.g. the developer wants to limit the character input within a UITextField, .distinctUntilChanged() will prevent the developer from manipulating the input from every second event if the second content is equal to the previous content because the second event won't be dispatched at all.
The text was updated successfully, but these errors were encountered: