TabularViewDemo is an Xcode project for iOS/iPadOS (13.0 and above) showcasing my TabularView Swift package, a package to display tabular data in a view, in a manner similar to how UICollectionView can display unidimensional data in a grid.
The package supports multiple columns, each with their own optional header and optional footer, indexed by an enumeration type, that you define, rather than an integer, so your code is clearer about which column or columns it refers to. There's also built-in support for sorting rows by a selected column.
The design philosophy is inspired heavily by how UICollectionView works. There are separate data source and delegate protocols (in fact, two delegate protocols, one for layout and another for sorting), and the data source is managed using the new (as of 2019) UICollectionView Diffable Data Source API.
There are some video screen captures illustrating
- how to show and hide headers and footers
- how to change the gap between columns
- how to change individual column widths
- how to sort data by selecting a column
- scrolling performance
but they're too large to display inline, so here's a screenshot of the demo app instead:
TabularViewDemo is available under the MIT license. See the LICENSE file for more info.
