Skip to content

Commit 354f310

Browse files
Merge pull request #90 from lightsprint09/perfom-batch-updates
Use batchupdates
2 parents 247e6fc + 5cfd185 commit 354f310

File tree

2 files changed

+4
-17
lines changed

2 files changed

+4
-17
lines changed

README.md

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,6 @@ tableView.dataSource = dataSource
3737
let changeAnimator = TableViewChangeAnimator(tableView: tableView, dataProvider: labelsToDispay)
3838
```
3939

40-
## Requirements
41-
42-
- iOS 9.3+
43-
- Xcode 10.1+
44-
- Swift 4.2
45-
4640
## Installation
4741

4842
### Swift Package Manager
@@ -52,16 +46,9 @@ let changeAnimator = TableViewChangeAnimator(tableView: tableView, dataProvider:
5246
Specify the following in your `Package.swift`:
5347

5448
```swift
55-
.package(url: "https://github.com/lightsprint09/Sourcing", from: "4.0.0"),
49+
.package(url: "https://github.com/lightsprint09/Sourcing", from: "4.1.0"),
5650
```
5751

58-
### Carthage
59-
60-
[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.
61-
62-
```ogdl
63-
github "lightsprint09/Sourcing" ~> 4.0
64-
```
6552
## Contributing
6653
See CONTRIBUTING for details.
6754

Source/ChangeAnimator/TableViewChangesAnimator.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,9 @@
170170
///
171171
/// - Parameter updates: list of updates to execute
172172
private func process(updates: [DataProviderChange.Change]) {
173-
tableView.beginUpdates()
174-
updates.forEach(process)
175-
tableView.endUpdates()
173+
tableView.performBatchUpdates({
174+
updates.forEach(process)
175+
})
176176
}
177177
}
178178
#endif

0 commit comments

Comments
 (0)