A Swift library that organizes UITableViewDelegate and UITableViewDataSource into a tree structure for cleaner, modular code.
CascadingTableDelegate is a Swift library that restructures UITableViewDelegate and UITableViewDataSource into a tree of smaller, focused delegates. It solves the problem of massive view controllers by allowing UITableView logic to be split across sections or rows, making code cleaner and more maintainable.
iOS developers building complex UITableView-based interfaces who struggle with large delegate and data source methods, especially those working on apps with multiple table sections or dynamic content.
Developers choose CascadingTableDelegate because it reduces code complexity without introducing new paradigms—it uses familiar UITableView APIs while enabling modular, testable, and reusable delegate components.
A no-nonsense way to write cleaner UITableViewDelegate and UITableViewDataSource in Swift.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Applies the Composite pattern to break down UITableView delegate and data source logic into hierarchical tree structures, allowing clean separation by sections or rows.
Uses standard UITableViewDelegate and UITableViewDataSource methods, making migration from existing code straightforward without learning new paradigms.
Provides CascadingRootTableDelegate and CascadingSectionTableDelegate classes that handle propagation logic out of the box, reducing boilerplate.
All implemented methods in the library are thoroughly unit tested, ensuring reliability as highlighted in the README.
Several UITableViewDelegate methods, such as those for section index titles or row moving, are not propagated by default, requiring manual subclassing and implementation.
Handling of estimated height methods can lead to layout issues or performance hits if not properly managed, as the library defaults to automatic dimension or zero values.
Developers must manually add the 'weak' modifier to the parentDelegate property to prevent retain cycles, which is error-prone and tedious.