Skip to content

Commit 125461f

Browse files
committed
Update README.md
1 parent 6ed826d commit 125461f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ It provides handlers for selecting, reordering, focusing and editing cells and a
1313
Examples of some of the included handlers:
1414

1515
```swift
16-
/// Handler that gets called when the user did select an item.
16+
// Handler that gets called when the user did select an item.
1717
diffableDataSource.selectionHandlers.didSelect = { itemIdentifier in
18-
// did select an item
18+
1919
}
2020

21-
/// Handler that gets called when an item/cell is about to be shown.
21+
// Handler that gets called when an item/cell is about to be shown.
2222
diffableDataSource.displayingHandlers.willDisplay = { itemIdentifier, cell in
2323

2424
}
@@ -31,11 +31,11 @@ diffableDataSource.displayingHandlers.willDisplay = { itemIdentifier, cell in
3131
tableViewDataSource.reorderingHandlers.canReorder = { item in return true }
3232

3333
// Update the backing store from the did reorder transaction.
34-
tableViewDataSource.reorderingHandlers.didReorder = { [weak self] transaction, itemIdentifier in
34+
tableViewDataSource.reorderingHandlers.didReorder = { [weak self] transaction, _ in
3535
guard let self = self else { return }
3636

37-
if let updatedBackingStore = self.backingStore.applying(transaction.difference) {
38-
self.backingStore = updatedBackingStore
37+
if let updatedCurrentItems = self.currentItems.applying(transaction.difference) {
38+
self.currentItems = updatedCurrentItems
3939
}
4040
}
4141
```

0 commit comments

Comments
 (0)