Protocols

The following protocols are available globally.

  • Provide a background view to be displayed behind the other contents of a cell. An implementation should maintain some internal state about the contents of the view.

    See more

    Declaration

    Swift

    public protocol BackgroundViewProvider
  • A type that provides the information required by FunctionalTableData to generate cells.

    The key property should be a unique String for the section that the item is contained in. It should also be representative of the item and not just a random value or UUID. This is because on an update pass the key is used to determine if an item has been added, moved, or removed from the data set. Using a stable value means that this can correctly be determined.

    The isEqual function is used to determine if two CellConfigType’s have matching keys and they represent the same data. This allows the system to update the views state directly when something has changed instead of forcing a reload of the entire cell all the time.

    When two items have matching key values but the isEqual call between old and new returns false the update function is called. It is the responsibility of this function to update the cell, and any subviews of the cell, to reflect the state.

    See more

    Declaration

    Swift

    public protocol CellConfigType : CollectionItemConfigType, TableItemConfigType
  • A type that identifies a dequeueable object. Used by FunctionalTableData to increase performance by reusing objects when it needs to, just like UITableView and UICollectionView.

    See more

    Declaration

    Swift

    public protocol Reusable : AnyObject