We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b4a2b9e + 36fa2a4 commit f564aa4Copy full SHA for f564aa4
Sources/Diff+UIKit.swift
@@ -63,14 +63,15 @@ public extension UICollectionView {
63
/// - parameter newData: Data which reflects the current state of UITableView
64
public func animateItemChanges<T: Collection>(
65
oldData: T,
66
- newData: T
+ newData: T,
67
+ completion: ((Bool) -> Void)? = nil
68
) where T.Iterator.Element: Equatable {
69
performBatchUpdates({
70
let update = BatchUpdate(diff: oldData.extendedDiff(newData))
71
self.deleteItems(at: update.deletions)
72
self.insertItems(at: update.insertions)
73
update.moves.forEach { self.moveItem(at: $0.from, to: $0.to) }
- }, completion: nil)
74
+ }, completion: completion)
75
}
76
77
0 commit comments