I have a custom View, and in this custom View I declared var isSelected: false
that is gonna be toggle when taping on the view.
After I add two of those custom Views in my ViewController.
What I need is: When I select one of view, the other one is immediately deselected, so only one can be selected at the same time.
I don't have much knowledge about it, but I assume that with RxCocoa (or ideally RxSwift) it might be possible to set this isSelected
variable of each view as an observable, and then in the subscription, set the other one to false once it turns true.
Help will be much appreciated, thank you in advance.