I am working on an app that presents 26 (alphabet) buttons. Right now they're all connected to the same function in the ViewController
, that in turn calls another function in the ViewModel
, and finally this function calls publishSubject.onNext()
. The ViewController
subscribes to the PublishSubject
and that's the whole circle.
The reason I did it this way, instead of binding the publish subject to the buttons' tap, is that I have to know who the sender is. Is there anyway to do so? If there isn't, is there a more intelligent design than mine in head?
Thanks!