architecture problem
johanntony opened this issue · 3 comments
johanntony commented
if there is a btn on cell. when i press the btn, how to deal with it ,if use this architecture. i am confuse about it.
cosminstirbu commented
Hi @johanntony,
I would suggest that the main presenter would have a list of cell presenters and when a button is tapped on the cell, the cell calls the corresponding method on the cell presenter.
Once this is done, you have two options:
- Have the cell presenter call a method on the main presenter (via the delegation pattern) or
- Have the cell presenter do the actual work by calling directly into the use case
Regards,
Cosmin
johanntony commented
Hi @johanntony,
I would suggest that the main presenter would have a list of cell presenters and when a button is tapped on the cell, the cell calls the corresponding method on the cell presenter.
Once this is done, you have two options:
- Have the cell presenter call a method on the main presenter (via the delegation pattern) or
- Have the cell presenter do the actual work by calling directly into the use case
Regards,
Cosmin
Excellent ! guy!
CatalinPrata commented
I am closing this as it seems to be resolved.