Skip to end of metadata
Go to start of metadata

At the heart of the data components in iOS is the table view component which is widely used in many iOS apps found in the App Store. Displaying data with the table view component provided in Crosslight is easy, thanks to the MVVM design pattern built to the core of Crosslight. In most cases, you only need a single line of class declaration to present your data – eliminating nearly hundred line of code typically required to implement common data display tasks. As the results, you can expect exponentially increased productivity and time saving in building great iOS apps.

The table view component offers numerous advantages such as high performance UI virtualization and flexible data presentation styles. At a glance, Crosslight's table view component includes the following key features:

  • Easy data binding through built-in ViewModel support
  • Two-way data binding support with built-in observable adapter and delegate
  • High-performance UI virtualization
  • Smooth animations when items are added or deleted at the same time
  • Grouping with section index display
  • In-table searching with option to hide the search bar initially
  • Support both synchronous and asynchronous searching
  • Templates customization for cell, section header and section footer
  • Flexible interaction mode, supporting both choice input and navigation mode
  • Rich editing support including batch editing and items re-ordering
  • Built-in image display supporting asynchronous loading
  • Comprehensive appearance settings with just simple property sets

On this page:

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.