FormViewController
The FormViewController
is a subclass of BaseViewController
and is themed with FormViewControllerStyle
. This view controller handles FormModel
.
UI structure
The root structure is composed of a StackView
that can contain the following elements.
Name | Description |
---|---|
ActionableButton | A UI component similar to a native UIButton with some default styling configuration. |
InputTextField | A UI component allowing users to enter information such as date, text, or password. |
CheckboxView | A UI component allowing users to select an element in a list. |
Modifying the UI structure
It is possible to remove or add any elements in the root structure.
To remove an existing element, invoke removeFromSuperview()
for the selected element.
To add a new view, invoke one of the following methods:
insertView(_ view: UIView, aboveView: UIView)
insertView(_ view: UIView, belowView: UIView)
Subclassing
When subclassing and instantiating your new view controller, it is required to invoke the super constructor by providing a ThemeRegistry
and a corresponding UIModel.
class CustomFormViewController: FormViewController {
init(model: FormModel, themeRegistry: ThemeRegistry) {
super.init(model: model, themeRegistry: themeRegistry)
// Your implementation
}
// Your custom implementation
}