Reputation: 49
What is the proper way to use snapshots in dataSource when u want to insert\update\delete cells ?
For example, first way
func test() {
var snapshot = dataSource.snapshot
snapshot.insert\delete\append
dataSource.apply(snapshot)
}
Second way
final class Test {
var snapshot = Snapshot()
func test() {
snapshot.insert\delete\append
dataSource.apply(snapshot)
}
}
The last - I have isolated snapshot struct which is not coupled with dataSource. I have tested both but dont see difference between these ways.
Upvotes: 0
Views: 55