At the heart of the Crosslight for iOS platform is the view components that have been enhanced to support data binding and MVVM design pattern. Crosslight enhances the view components in a way that does not require subclassing so you can continue using the controls in the same way and manner as in the common iOS development – whether designing them through Xcode or create them programmatically. As the results, Crosslight delivers the best of both worlds by extending the existing controls with new functionality in loosely-coupled fashion.
The following table lists the MVVM-enabled view components along with the supported bindable properties.
View Component | Supported Bindable Properties |
---|---|
UIView |
|
UIBarButtonItem |
|
UIButton |
|
UICollectionView |
|
UIDatePicker |
|
UIImageView |
|
UILabel |
|
UIPickerView |
|
UIProgressView |
|
UISegmentedButton |
|
UISlider |
|
UIStepper |
|
UISwitch |
|
UITableView |
|
UITextField |
|
UITextView |
|
UIWebView |
|
Since Crosslight itself was implemented in a highly extensible architecture, you can easily create your own bindable properties – or support these bindable properties in your own view components by creating your own binding adapter. The binding adapter is the mediator that communicates the data flow between the view components and the ViewModel. The binding adapter is considered an advanced topic and is not covered in the release of this guide. It will be discussed in the next update of the guide.
The explanation and usage of each bindable properties listed above is discussed individually per related section in the guide. For instance, the supported bindable properties in table view are discussed in Working with Data Components.
For more information about how bindable properties work, see Crosslight Data Binding Features. For more information about the basic concept of Crosslight and MVVM pattern, see Crosslight and MVVM at a Glance.