An easy declarative way to build your scrollable vertical forms
✅ Declarative filling
form.add(Builder<UILabel> { $0.text = "Omae wa mou shindeiru" })
.add(YourViewBuilder()) // inherited from IViewBuilder
.add(Builder<UIButton>, to: .bottom) // button 'snapped' to the bottom
.build()
✅ Automatic scroll height calculation that supports changes at runtime
✅ Reorderable forms
form.configuration = VCFormConfiguration(reorderable: true)
✅ Separate header and footer sections
Here's an example from my pet project
Install with SPM 📦
You can start building forms straight away with the included builders: Builder<T: UIView>
, XibBuilder<T: UIView>
.
The first builder initializes the view with .init(frame: .zero)
, the second one loads the view from the .xib file.
You also can create your own builders with the IViewBuilder
protocol.
This project is released under the MIT license.