Skip to content

Commit

Permalink
Use batchupdates
Browse files Browse the repository at this point in the history
  • Loading branch information
lightsprint09 committed Nov 15, 2022
1 parent 247e6fc commit 5cfd185
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 17 deletions.
15 changes: 1 addition & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,6 @@ tableView.dataSource = dataSource
let changeAnimator = TableViewChangeAnimator(tableView: tableView, dataProvider: labelsToDispay)
```

## Requirements

- iOS 9.3+
- Xcode 10.1+
- Swift 4.2

## Installation

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

```swift
.package(url: "https://github.com/lightsprint09/Sourcing", from: "4.0.0"),
.package(url: "https://github.com/lightsprint09/Sourcing", from: "4.1.0"),
```

### Carthage

[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.

```ogdl
github "lightsprint09/Sourcing" ~> 4.0
```
## Contributing
See CONTRIBUTING for details.

Expand Down
6 changes: 3 additions & 3 deletions Source/ChangeAnimator/TableViewChangesAnimator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,9 @@
///
/// - Parameter updates: list of updates to execute
private func process(updates: [DataProviderChange.Change]) {
tableView.beginUpdates()
updates.forEach(process)
tableView.endUpdates()
tableView.performBatchUpdates({
updates.forEach(process)
})
}
}
#endif

0 comments on commit 5cfd185

Please sign in to comment.