Adapter

public protocol Adapter : AnyObject

Represents an adapter that holds data to be rendered.

  • The data to be rendered.

    Declaration

    Swift

    var data: [Section] { get set }
  • cellNodes(in:) Extension method

    Returns a collection of cell nodes in the specified section.

    Declaration

    Swift

    func cellNodes(in section: Int) -> [CellNode]

    Return Value

    A collection of cell nodes in the specified section.

  • cellNode(at:) Extension method

    Returns a node of cell at the specified index path.

    Declaration

    Swift

    func cellNode(at indexPath: IndexPath) -> CellNode

    Return Value

    A node of cell at the specified index path.

  • headerNode(in:) Extension method

    Returns a node of header in the specified section.

    Declaration

    Swift

    func headerNode(in section: Int) -> ViewNode?

    Return Value

    A node of header in the specified section.

  • footerNode(in:) Extension method

    Returns a node of footer in the specified section.

    Declaration

    Swift

    func footerNode(in section: Int) -> ViewNode?

    Return Value

    A node of footer in the specified section.