TableViewChangesAnimator
public final class TableViewChangesAnimator
A listener that observes changes of a data provider. It creates animations to make changes visible in the view by using
UITableView
s APIs to animate cells. You can configure your animations as needed for each change.
-
Undocumented
See moreDeclaration
Swift
public struct Configuration
-
Creates an instance and starts listening for changes to animate them into the table view.
Declaration
Swift
public convenience init(tableView: UITableView, observable: DataProviderObservable, configuration: Configuration = Configuration())
Parameters
tableView
the table view which should be animated
observable
observable for listing to changes of a data provider
configuration
configure animations for table view change actions.
-
Creates an instance and starts listening for changes to animate them into the table view.
Declaration
Swift
public convenience init<D: DataProvider>(tableView: UITableView, dataProvider: D, configuration: Configuration = Configuration())
Parameters
tableView
the table view which should be animated
dataProvider
data provider which should be observed for changes.
configuration
configure animations for table view change actions.
-
Creates an instance and starts listening for changes to animate them into the table view. Use this initializer if you want to reconfigure cells on update instead of reload the cell.
Declaration
Swift
public convenience init<DataProvide: DataProvider, ReusableViewConfig: ReusableViewConfiguring>(tableView: UITableView, dataProvider: DataProvide, cellConfiguration: ReusableViewConfig, configuration: Configuration = Configuration()) where DataProvide.Element == ReusableViewConfig.Object
Parameters
tableView
the table view which should be animated
dataProvider
data provider for listing to changes & reconfiguring cells
cellConfiguration
reusable view onfiguration to reconfigure views on update.
configuration
configure animations for table view change actions.