FetchedResultsDelegateProvider

public final class FetchedResultsDelegateProvider<CellConfig> where CellConfig : ReusableViewConfigProtocol

A FetchedResultsDelegateProvider is responsible for providing a delegate object for an instance of NSFetchedResultsController.

Type aliases

  • The parent view of cell’s that the cell configuration produces.

    Declaration

    Swift

    public typealias ParentView = CellConfig.View.ParentView

Properties

  • The table view or collection view displaying data for the fetched results controller.

    Declaration

    Swift

    public weak var cellParentView: CellConfig.View.ParentView?
  • The cell configuration.

    Declaration

    Swift

    public let cellConfig: CellConfig

Collection views

  • Initializes a new fetched results delegate provider for collection views.

    Declaration

    Swift

    public convenience init(cellConfig: CellConfig, collectionView: UICollectionView)

    Parameters

    cellConfig

    The cell configuration with which the fetched results controller delegate will configure cells.

    collectionView

    The collection view to be updated when the fetched results change.

  • Returns the NSFetchedResultsControllerDelegate object for a collection view.

    Declaration

    Swift

    public var collectionDelegate: NSFetchedResultsControllerDelegate { get }

Table views

  • Initializes a new fetched results delegate provider for table views.

    Declaration

    Swift

    public convenience init(cellConfig: CellConfig, tableView: UITableView)

    Parameters

    cellConfig

    The cell configuration with which the fetched results controller delegate will configure cells.

    tableView

    The table view to be updated when the fetched results change.

  • Returns the NSFetchedResultsControllerDelegate object for a table view.

    Declaration

    Swift

    public var tableDelegate: NSFetchedResultsControllerDelegate { get }