Refactor method signature and responsibility of the UITableViewUpdater/UICollectionViewUpdater.
You can now intercepts arbitrary processes before or after updates, for example:
open func performDifferentialUpdates(target: UITableView, adapter: Adapter, stagedChangeset: StagedDataChangeset) {
super.performDifferentialUpdates(target: target, adapter: adapter, stagedChangeset: stagedDataChangeset)
if stagedChangeset.allSatisfy({ $0.hasChanges }) {
let y = target.contentSize.height - (target.bounds.height - target.adjustedContentInset.bottom)
let contentOffset = CGPoint(x: target.contentOffset.x, y: y)
setContentOffset(contentOffset, animated: true)
}
}
Remove completion from Renderer.
Add completion to UITableViewUpdater/UICollectionViewUpdater.
Change constraints of type parameters Adapter of UITableViewUpdater/UICollectionViewUpdater to UITableViewAdapter/UICollectionViewAdapter.
close #36
Checklist
Description
Breaking Changes
Refactor method signature and responsibility of the
UITableViewUpdater/UICollectionViewUpdater
. You can now intercepts arbitrary processes before or after updates, for example:Remove
completion
fromRenderer
.Add
completion
toUITableViewUpdater/UICollectionViewUpdater
.Change constraints of type parameters Adapter of
UITableViewUpdater/UICollectionViewUpdater
toUITableViewAdapter/UICollectionViewAdapter
.Related Issue
https://github.com/ra1028/Carbon/issues/36
Motivation and Context
See related issue.
Impact on Existing Code
See description.