Long detail screens are not lists, but we kept building them as table views: one section per kind of content, a cell class each, and a data source that exists only to return a fixed order. The result is hard to read and harder to reorder.
github.com/malcommac/ScrollStackController
ScrollStackController
Build complex scrollable layouts out of view controllers or plain views, with far less code.
Community maintained·Swift·since 2019
- –stars
- –forks
- –license
- –last push
In one look
stackView.addRows(controllers: [welcomeVC, tagsVC, galleryVC],
animated: false)What it does
-
Rows are real units
Compose a screen from view controllers or plain views, each one testable on its own.
-
Reorder without index paths
Hide, resize and rearrange rows by identity, not by position in a data source.
-
Lifecycle handled
Child view controller containment is taken care of, so each row gets its callbacks.