I have a class with the Variable
properties number
and text
and want to observe any changes done on both variables. The values of these properties are not needed.
In my real case I have more than 10 Variables
to observe, so maybe it should be possible to pass them as an array of .asObservable()
.
let number: Variable<Int>
let text: Variable<String>
func doSomethingWhenAnyValueWasChanged() {
// some code
}
How do I achieve that?
I tried to do it with Observable.combineLatest()
in multiple ways, but it didn't work out for me. Maybe I missed something?