Classes

The following classes are available globally.

  • TableModel is the data structure being used in DataTable View.

    Code Usage:

    let header = TableRowItem(leadingAccessories: [], trailingAccessory: nil, data: titles)
    let model = TableModel(headerData: header, rowData: res, isFirstRowSticky: true, isFirstColumnSticky: true, showListView: true)
    model.columnAttributes = ...
    model.didSelectRowAt = { rowIndex in
       print("Tapped row \(rowIndex)")
    }
    
    /// set a closure to check whether a dataItem located at (rowIndex, columnIndex) is valid; If it is valid, returns (true, nil); if it is not valid, returns false and an error message which is shown to users.
    model.validateDataItem = { rowIndex, columnIndex, dataItem in
    ...
    }
    
    /// set a closure to provide a `DataListItem` type dataItem located at (rowIndex, columnIndex) for an array of Strings and a title for inline editing mode
    model.listItemDataAndTitle = { rowIndex, columnIndex in
    ...
    }
    
    /// set a closure to observe a value change for inline editing mode
    model.valueDidChange = { change in
        print("valueDidChange: \(change.description)")
    }
    
    See more

    Declaration

    Swift

    public class TableModel : ObservableObject
  • Undocumented

    See more

    Declaration

    Swift

    public final class StyleCache : ObservableObject