A Swift library for declaratively representing UITableView data structures with a fluent API.
Shoyu is a Swift library that provides a declarative, fluent API for representing and managing UITableView data structures. It simplifies configuring sections, rows, headers, and footers by encapsulating delegate methods and reducing boilerplate code, making table view code more readable and maintainable.
iOS developers working with UITableView in Swift who want to reduce boilerplate, improve code clarity, and leverage type-safe, declarative patterns for table configuration.
Developers choose Shoyu for its intuitive fluent API, Swift generics support for type safety, and encapsulation of UITableViewDelegate logic, which collectively streamline table view development compared to manual delegate/dataSource implementations.
Easier way to represent the structure of UITableView.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Shoyu's chainable syntax allows intuitive table configuration, as shown in the README where sections and rows are defined with closure-based handlers that mirror the UI hierarchy.
Leveraging Swift generics for rows and sections ensures compile-time type checking, reducing casting errors, evident in examples like Row<MemberTableViewCell> for safe cell configuration.
Common UITableViewDelegate methods such as heightFor and didSelect are encapsulated directly on row objects, simplifying event handling and reducing scattered code.
The createRows method enables creating multiple rows from arrays with concise closures, streamlining dynamic content setup, as demonstrated with the members array example.
Shoyu only supports UITableView, making it unsuitable for projects that use UICollectionView or need a unified approach for different list types, limiting its versatility.
Introducing the Source model adds complexity for teams accustomed to standard UITableViewDataSource and delegate patterns, potentially increasing integration effort and learning curve.
As a niche library, Shoyu has fewer community resources and less frequent updates compared to mainstream solutions, which could affect long-term support and adoption of newer iOS features.
The fluent API and closure-based configuration might introduce slight overhead in memory and execution compared to direct delegate implementations, especially in very large or frequently updated tables.