Suppose I have an var id = Variable<Int>(0)
. I want to observe changes to it from another Variable or Observable called team (var team = Observable<Team>
). the team observable will be observed by the view controller and will update the UI there. Therefore, the id variable serves only to create/update (through creating Team(id: id)
) the value of the team observable.
I have been trying multiple approaches such as combineLatest
or subscribe
but I always get compile error saying:
Closure cannot implicitly capture a mutating self parameter
What's going on?