mercredi 27 novembre 2019

Clean Architecture - Propagate changes from deeply nested child views to parent

Example View Hierarchy

Given the view hierarchy in the image above, if a user taps on the "Cell" view - which is 4 "levels" deep [UIViewController -> UIView -> UICollectionView -> Cell] - how do changes made propagate to the top level i.e. UIViewController?

If I was using redux or similar it would be quite simple, I would fire off an action and it would be handled accordingly. In clean architecture, what are the best practices to avoid issues of handing down delegate methods through 4 layers of code?

Aucun commentaire:

Enregistrer un commentaire