List View

IOSUIListView supports displaying rows as a simple list, as groupped and seaprated by group. List view rows can be specified by DefaultListViewModel or implementing IOSUIListViewModel.

DefaultListView model is for displaying predefined style of rows, while implementing IOSUIListViewModel gives full control over row content.

final IOSUIListView lv1 = new IOSUIListView(new DefaultListViewModel(ListKind.SIMPLE, new TestLD()));
content.addXY(lv1,1,1, "f,f");
final IOSUIListView lv2 = new IOSUIListView(new DefaultListViewModel(ListKind.GROUPPED, new TestLD()));
content.addXY(lv2,3,1, "f,f");
final IOSUIListView lv3 = new IOSUIListView(new DefaultListViewModel(ListKind.SEPARATED, new TestLD()));
content.addXY(lv3,5,1, "f,f");

DefaultListViewModel uses ListDataModel, which contains ListDataGroups for list groups. ListDataGroup contains ListDataitems for rows. The items contains predefined fields for a row. The implementation responsibility to load and save these field data to the data object. The following fields are supported:

  • Empty - it is a placeholder, no value required.
  • Icon - read only, URL
  • Title - read only, String
  • Detail - read only, String
  • Switch - read/write, Boolean
  • Check - static, displays a check mark
  • More - statis, displays More ison
  • Value - read only, String
  • EditableValue - read/write, String
  • PasswordValue - read/write, String

Implementing IOSUIListViewModel gives full control over row creation, however implementation responsibility to load and save data to/from row components. IOSUIListview creates rows as needed and drop them as they not needed anymore. There is no notification when a row is dropped so it is the responsibility to get changes from the components as it happens.