Introducing UITableViewController with ViewModel Support
Programming with the table view typically require a lot of code which involve a number of processes such as configuring the data source and the delegate. In addition, these data components require a deep understanding on the table hierarchy and cell reuse which are important aspects to build high performance data presentation. The implementation process is considerably sensitive, which means that a simple failure or incorrect implementation will lead to random crash and unexpected behaviors in both table and collection view.
Crosslight introduces an advanced table view which takes care most of the details in the table view implementation such as the data source provider, UI virtualization, memory allocation and automatic object disposal and much more. The UITableViewController(TViewModel) class also exposes much more data presentation features not available in the native table view controller.
The following code example shows how easy it is to display a simple list with Crosslight's table view component.
The result of the simple code above looks like the image below.
For more information about displaying data in iOS such as enabling grouping, filtering and more, see Displaying Data in iOS.
Customizing Table View Appearance
In traditional iOS apps development, customizing a table view has been one of the most daunting task for developers since some detailed objects are not directly accessible from the table view. Crosslight makes table view customization a breeze, thanks to the centralized appearance settings introduced in Crosslight's table view controller. Not only you can customize the table-level settings, it enables you to customize the cell and content appearance directly such as the cell background, title attributes, content insets and much more. The latest Crosslight release also adds new capabilities not possible before, including ability to enable blur visual effect to the content and separator view with just a simple property set. No tedious class override or additional code required.
The figure below presents an overview of customizable appearance settings in Crosslight table view.
To see the complete appearance settings that you can customize, please refer to TableViewAppearance Class.
The following code example shows how easy it is to customize the table view appearance to your liking.
To jump start using Crosslight table view and see it in actions, please check out Data Samples and WebAPI-enabled Inventory Tracker samples. If you are new to Crosslight, it is recommended that you start from the data samples. The inventory tracker sample demonstrates the best practices for enterprise data access design patterns such as repository, model services, view query definition, and more.