DiffableDataSourceTarget

public protocol DiffableDataSourceTarget

The DiffableDataSource.Target protocol allows custom views to consume ListSnapshot diffable data similar to how DiffableDataSource.TableViewAdapter and DiffableDataSource.CollectionViewAdapter reloads data for their corresponding views.

Public

  • Whether reloadData() should be executed instead of performBatchUpdates(updates:animated:).

    Declaration

    Swift

    var shouldSuspendBatchUpdates: Bool { get }
  • Deletes one or more sections.

    Declaration

    Swift

    func deleteSections(at indices: IndexSet, animated: Bool)
  • Inserts one or more sections

    Declaration

    Swift

    func insertSections(at indices: IndexSet, animated: Bool)
  • Reloads the specified sections.

    Declaration

    Swift

    func reloadSections(at indices: IndexSet, animated: Bool)
  • Moves a section to a new location.

    Declaration

    Swift

    func moveSection(at index: IndexSet.Element, to newIndex: IndexSet.Element, animated: Bool)
  • Deletes the items specified by an array of index paths.

    Declaration

    Swift

    func deleteItems(at indexPaths: [IndexPath], animated: Bool)
  • Inserts items at the locations identified by an array of index paths.

    Declaration

    Swift

    func insertItems(at indexPaths: [IndexPath], animated: Bool)
  • Reloads the specified items.

    Declaration

    Swift

    func reloadItems(at indexPaths: [IndexPath], animated: Bool)
  • Moves the item at a specified location to a destination location.

    Declaration

    Swift

    func moveItem(at indexPath: IndexPath, to newIndexPath: IndexPath, animated: Bool)
  • Animates multiple insert, delete, reload, and move operations as a group.

    Declaration

    Swift

    func performBatchUpdates(updates: () -> Void, animated: Bool, completion: @escaping () -> Void)
  • Reloads all sections and items.

    Declaration

    Swift

    func reloadData()