FWFormViewModel
final class FWFormViewModel
A representation of the FWForm‘s ViewModel.
-
Responsible for providing a communication between the
FWFormViewModeland itsView.Declaration
Swift
weak var delegate: FWFormViewModelDelegate
-
Initializes a new instance of this type.
Declaration
Swift
init(configuration: FWConfiguration)Parameters
configurationThe configuration used to create a form.
-
The form’s title.
Declaration
Swift
var title: String -
The number of components on the form.
Declaration
Swift
var numberOfComponents: Int { get } -
The form’s color style.
Declaration
Swift
var style: FWStyle -
Returns the component’s
ViewModelfor the given index.Declaration
Swift
func viewModelAt(index: IndexPath) -> FWComponentViewModel -
Submits answers if every component is valid.
Declaration
Swift
func submit() -> Result<FWFormSnapshot, Error> -
Sets the form up using the
FWConfigurationpassed as a paremeter in theFWFormViewModelinit.Declaration
Swift
func setUp()
View on GitHub
FWFormViewModel Class Reference