The combination of UIStackView(Vertical Axis) and UIScrollView, and more.
- Row Alignment: Easily configure row alignments.
- Multiple Views in one Row: Add multiple views to a single row.
- Section: Organizing items into distinct sections.
- Keyboard Handling: Automatically adjusts its
contentInset
based on keyboard visibility and end editing gesture. - Customizable Background: Supports applying custom background to both the entire FormView and individual sections.
- Flexible Item Spacing: Customize the spacing between items using three different approaches.
- DSL Syntax:Supports a DSL syntax for a SwiftUI-like experience.
- iOS 13.0+
- tvOS 13.0+
formView.populate {
FormRow(imageView, heightMode: .fixed(80))
.settingCustomSpacingAfter(20)
FormRow(titleLabel, alignment: .center)
.settingCustomSpacingAfter(20)
FormRow(detailLabel)
.settingCustomSpacingAfter(40)
FormSection(backgroundView: FieldBackgroundView(), contentInset: .init(top: 20, left: 20, bottom: 20, right: 20), itemSpacing: 15) {
FormRow(idTextField)
FormSeparator()
FormRow(pswTextField)
}
.settingCustomSpacingAfter(10)
FormRow {
signUpButton
UIView()
forgotPswButton
}
FormSpacer(50)
FormRow(loginButton, insets: .init(top: 0, left: 20, bottom: 0, right: 20))
}
iOS | tvOS |
---|---|
Using Swift Package Manager:
import PackageDescription
let package = Package(
name: "MyAwesomeApp",
dependencies: [
.Package(url: "https://github.com/xueqooy/Form", majorVersion: 2),
]
)
Form is licensed under the MIT License. See LICENSE for more information.
- GitHub: https://github.com/xueqooy/XUI
- Email: [email protected]